锘?/鍥炲埌椤堕儴 start============================================================================================ var scrolltotop={ setting: {startline:1, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]}, controlHTML: '', controlattrs: {offsetx:300, offsety:120}, anchorkeyword: '#gotop', title: '杩斿洖椤堕儴', state: {isvisible:false, shouldvisible:false}, scrollup:function(){ if (!this.cssfixedsupport) this.$control.css({opacity:0}) var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto) if (typeof dest=="string" && jQuery('#'+dest).length==1) dest=jQuery('#'+dest).offset().top else dest=0 this.$body.animate({scrollTop: dest}, this.setting.scrollduration); }, keepfixed:function(){ var $window=jQuery(window) var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety this.$control.css({left:controlx+'px', top:controly+'px'}) }, togglecontrol:function(){ var scrolltop=jQuery(window).scrollTop() if (!this.cssfixedsupport) this.keepfixed() this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false if (this.state.shouldvisible && !this.state.isvisible){ this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0]) this.state.isvisible=true } else if (this.state.shouldvisible==false && this.state.isvisible){ this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1]) this.state.isvisible=false } }, init:function(){ jQuery(document).ready(function($){ var mainobj=scrolltotop var iebrws=document.all mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body') mainobj.$control=$('
'+mainobj.controlHTML+'
') .css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'}) .attr({title:mainobj.title}) .click(function(){mainobj.scrollup(); return false}) .appendTo('body') if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') mainobj.$control.css({width:mainobj.$control.width()}) mainobj.togglecontrol() $('a[href="' + mainobj.anchorkeyword +'"]').click(function(){ mainobj.scrollup() return false }) $(window).bind('scroll resize', function(e){ mainobj.togglecontrol() }) }) } } //鍥炲埌椤堕儴 End========================================================================================================== function sAlert(strTitle,strContent){ var msgw,msgh,bordercolor; msgw=400;//鎻愮ず绐楀彛鐨勫搴 msgh=300;//鎻愮ず绐楀彛鐨勯珮搴 titleheight=25 //鎻愮ず绐楀彛鏍囬楂樺害 bordercolor="#336699";//鎻愮ず绐楀彛鐨勮竟妗嗛鑹 titlecolor="#99CCFF";//鎻愮ず绐楀彛鐨勬爣棰橀鑹 var sWidth,sHeight; sWidth=document.body.offsetWidth; sHeight=screen.height; var bgObj=document.createElement("div"); bgObj.setAttribute('id','bgDiv'); bgObj.style.position="absolute"; bgObj.style.top="0"; bgObj.style.background="#777"; bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; bgObj.style.opacity="0.6"; bgObj.style.left="0"; bgObj.style.width=sWidth + "px"; bgObj.style.height=sHeight + "px"; bgObj.style.zIndex = "10000"; // document.body.appendChild(bgObj); var msgObj=document.createElement("div"); msgObj.setAttribute("id","msgDiv"); msgObj.setAttribute("align","center"); msgObj.style.background="white"; msgObj.style.border="1px solid " + bordercolor; msgObj.style.padding="5px"; msgObj.style.position = "absolute"; msgObj.style.left = "50%"; msgObj.style.top = "30%"; msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; msgObj.style.marginLeft = "-225px" ; msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; msgObj.style.width = msgw + "px"; msgObj.style.height =msgh + "px"; msgObj.style.textAlign = "left"; msgObj.style.lineHeight ="25px"; msgObj.style.zIndex = "10001"; var title=document.createElement("h4"); title.setAttribute("id","msgTitle"); title.setAttribute("align","right"); title.style.margin="0"; title.style.padding="3px"; title.style.background=bordercolor; title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);"; title.style.opacity="0.75"; title.style.border="1px solid " + bordercolor; title.style.height="18px"; title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif"; title.style.color="white"; title.style.cursor="pointer"; title.title = "鐐瑰嚮鍏抽棴"; title.innerHTML="
"+ strTitle +"鍏抽棴
"; title.onclick=function(){ document.body.removeChild(bgObj); document.getElementById("msgDiv").removeChild(title); document.body.removeChild(msgObj); } document.body.appendChild(msgObj); document.getElementById("msgDiv").appendChild(title); var txt=document.createElement("p"); txt.style.margin="1em 0"; txt.setAttribute("id","msgTxt"); txt.innerHTML=strContent; document.getElementById("msgDiv").appendChild(txt); } //sAlert("閲嶈閫氱煡","閲嶈閫氱煡锛欬br>1銆佸崗浼氬師瀹氫簬3鏈?5鏃?26鏃ヤ妇鍔炵殑鏍囧噯鍖栧煿璁彮锛屽洜鐤儏鍘熷洜鎺ㄨ繜锛屽叿浣撴椂闂村彟琛岄€氱煡锛汓br>2銆佸煿璁彮缁х画鎺ュ彈缃戜笂鎶ュ悕锛汓br>3銆佽澶у鍏虫敞鍗忎細缃戠珯銆佸井淇$兢銆丵Q缇ゅ姩鎬侊紱鎰熻阿澶у鐞嗚В涓庢敮鎸 锛佽鐩镐簰杞憡锛?) $(function(){ $("#closeNotice").click(function(){ $("#msgDiv").hide(); }) })