/*JScript文件*/ //翻页的跳转 function goToTheUrl(TheSelect){ location.href="UifTfmfdu.wbmvf;" } //限制内容图片大小 function resize(o,w) { if (o.width>w) { o.style.width=w+'px'; o.style.height='auto'; } } //搜索 function SearchList(txtId, defaultvalue){ var thetxt = document.getElementById(txtId); if (thetxt.value == "" || thetxt.value == defaultvalue) { alert(defaultvalue); thetxt.focus(); return; } location.href="Ofxt_Tfbsdi.qiq?ubh=Tfbsdi&uifuyu=" + encodeURIComponent(thetxt.value); } $(function(){ /*栏目*/ $("#CommTop .center .nav ul li").hover(function(){ var index = $("#CommTop .center .nav ul li").index(this); $(this).addClass("onfocus").siblings().removeClass("onfocus"); $("#CommTop .center .xiala").hide(); $("#CommTop .center .xiala").eq(index).show(); }) $("#CommTop .center .nav ul dd").hover(function(){ $(this).addClass("onfocus").siblings().removeClass("onfocus"); }) /*左侧导航*/ $("#left .list ul li").eq(0).addClass("onfocus").find("dl").show(); $("#left .list ul li").click(function(){ $(this).addClass("onfocus").find("dl").show().parent().siblings().removeClass("onfocus").find("dl").hide(); }) $("#left .list ul li dd").hover(function(){ $(this).find(".sun").show(); },function(){ $(this).find(".sun").hide(); }) }) /*底部下拉*/ $(function(){ $("#CommBottom .center .qtwz img").click(function(e){ $("#CommBottom .center .qtwz .list").toggle(); e.stopPropagation(); //阻止事件冒泡,否则事件会冒泡到下面的文档点击事件 $("#CommBottom .center .qtwz .list").show(); }) $(document).click(function() { $("#CommBottom .center .qtwz .list").hide(); }); $("#CommBottom .center .qtwz .list ul li").hover(function(){ $(this).addClass("onfocus").siblings().removeClass("onfocus"); }) $("#CommBottom .center .qtwz .list ul li").click(function(){ var html = $(this).find("a").html(); $("#CommBottom .center .qtwz .text").val(html); }) }) /*左侧高度*/ $(function(){ var height = $("#right").height(); $(".Leftbgn").height(height); }) /**文字向上滚动**/ function UpScroll(type,DivName){ if(type == "id"){ var obj = $("#"+DivName) }else{ var obj = $("."+DivName) } var speed=2000; var down = true; var MyMar2=setInterval(scroll,speed); obj.mouseover(function() {clearInterval(MyMar2);}); obj.mouseout(function() {MyMar2=setInterval(scroll,speed);}); $(obj).find(".prev").click(function(){ scroll() }) $(obj).find(".next").click(function(){ down = false; scroll() }) function scroll(){ var self = obj.find("ul:first"); var lineHeight = self.find("li:first").height(); if(down){ self.animate({ "margin-top" : -lineHeight +"px" },600 , function(){ self.css({"margin-top":"0px"}).find("li:first").appendTo(self); }) }else{ self.animate({ "margin-top" : lineHeight +"px" },600 , function(){ self.css({"margin-top":"0px"}).find("li:last").prependTo(self); down = true; }) } } } //翻页的跳转 function goToTheUrl(TheSelect){ location.href="UifTfmfdu.wbmvf;" } //限制内容图片大小 function resize(o,w) { if (o.width>w) { o.style.width=w+'px'; o.style.height='auto'; } } //加入收藏(调用addfavorite();) function addfavorite(){ try { window.external.addFavorite(window.location.href, document.title); } catch (e) { try { window.sidebar.addPanel(document.title, window.location.href, ""); } catch (e) { alert('请使用按键 Ctrl+d,收藏网址') } } } //设为首页(调用setHome(this,window.location);) function setHome(obj, vrl){ try { obj.style.behavior = 'url(#default#homepage)'; obj.setHomePage(vrl); } catch (e) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage', vrl); } catch (e) { alert("此操作被浏览器拒绝!\n请手动设为首页。"); } } } //显示动画 function showFlash(flashWIDTH, flashHEIGHT, flashURL){ if (flashURL.indexOf("?") != -1) { flashURL += '&rad=' + Math.random(); } else { flashURL += '?rad=' + Math.random(); } document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); } //搜索 function SearchList(txtId, defaultvalue){ var thetxt = document.getElementById(txtId); if (thetxt.value == "" || thetxt.value == defaultvalue) { alert(defaultvalue); thetxt.focus(); return; } location.href="Ofxt_Tfbsdi.qiq?ubh=Tfbsdi&uifuyu=" + encodeURIComponent(thetxt.value); }