javascript ½Å±¾³ö´í
ÔÚ¸üÐÂÃæ°åÀï×¢²áÁËÒ»¸öJavaScript½Å±¾£¨½Å±¾µÄ×÷Ó㺹ö¶¯ÏÔʾÎÄ×Ö£©£¬ÔÚ³ÌÐòÁ¬ÐøÅÜ30·ÖÖÓÒԺ󣬵¯³öÒ»¸ö´íÎóÌáʾ¿ò£¬´íÎó£ºÎ´Ö¸Ã÷µÄ´íÎó ״̬Âð£º0£¬ÆÚ´ý¸ßÊÖºÍÎÒÒ»Æð½â¾ö¡£
ÏȰﶥ¡£¡£¡£´úÂëÄØ£¿
×Ô¼ºÒ²¶¥Ï¡£
ÎÒ°Ñ´úÂë·¢ÉÏÀ´¡£
Õâ¾äÊÇÔÚloadʼþÀïдµÄ£ºScriptManager.RegisterStartupScript(upMarquee, this.GetType(), "marquee", "var timeoutexists = false;var speed = " + speed + ";/*ÅжÏä¯ÀÀÆ÷ÀàÐÍ*/var isMSIE = (navigator.appName == 'Microsoft Internet Explorer');/*¹ö¶¯¶ÔÏó)*/ var oMarquee = document.getElementById('mq');/*ÄÚÈݶÔÏó*/var omqdemo = document.getElementById('mqdemo');var w = oMarquee.offsetWidth;var odl = omqdemo.offsetWidth;var x = parseInt(w/odl)+1;for(var i=0;i <x;i++){ var o = omqdemo.cloneNode(true); oMarquee.appendChild(o);}var iScrollAmount = 1;function scroll(){try{ oMarquee.scrollLeft += iScrollAmount; }catch(e){alert('´íÎóÐÅÏ¢£º' + e.message);}finally{var ol = oMarquee.scrollLeft;/*IEºÍFFµÄλÖÃÓв»Í¬*/ if(isMSIE){ if(odl-ol <=0){ oMarquee.scrollLeft = 0; } }else{ if(odl-ol <=-10){ oMarquee.scrollLeft = 2; } } } } var MyMar = window.setInterval(scroll,speed);", true);
html´úÂ룺 <div class="displayMarDiv">
<asp:UpdatePanel ID="upMarquee" runat="server" UpdateMode="Conditional">
&nb
Ïà¹ØÎÊ´ð£º
javascriptÎÊÌ⣺
var win1000
var win1001
¶¨ÒåºÃÁË2¸ö±äÁ¿£¬µ«ÊÇ 1000,¸ú1001ÎÒÊǶ¯Ì¬»ñÈ¡µÄ£¬Ç°ÃæÖ»ÓÐwinÊÇÒÑÖªµÄ£¬ÎÒÒªÔõôд²Å¿ÉÒÔʹÓÃÕâ¸ö±äÁ¿
L@_@K
JScript code:
var w ......
¸÷λºÃ:
ÓйØÒÉÎÊÊÇÕâÑùµÄ:
ÎÒÔÚÒ³ÃæÀïÃæ¼ÓÁËÒ»¶ÎJSµÄ´úÂëÖÐÓиöº¯Êý,´ó¸ÅÈçÏÂ:
JScript code:
<script language = javascript>
function test()
{
alert("testOK");
......
function(data){
var idd=data.id;
var addchildbutton=document.createElement(" <input type='button' onclick='addchild("+idd+")'>");
addchildbutto ......
Ç°Óжà¸öJavaScriptº¯Êý
ºóÃæÌá½»¿É <form name="" action="" method="" onsubmit="return isPostalCode();return isID();return isEmail() "
¿ÉÕâÑùÐ ......