Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScript Çë½Ì

ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(),this.ClientID, " <script language=\"javascript\" type=\"text/javascript\"> if(confirm('ÐèÒªÖ±½ÓÌá½»Âð?')) {......} else{....} </script>" , false);

ÏÖÓÐÒ»¸ölable
µ±ÉÏÃæÓï¾äÖÐif³ÉÁ¢Ê±,ÏëÈÃlableµÄtextµÈÓÚ0
.....ºÅ²¿·ÖÔõôд?
JScript code:

document.getElementById("LableµÄID").innerText = "0";


ÒòΪ·þÎñÆ÷¿Ø¼þLable½âÎö³Éhtml´úÂ룬ÊÇ <span id="label_Id">labelµÄÖµ </span>

ÒýÓÃ
JScript code
document.getElementById("LableµÄID").innerText="0";
ÒòΪ·þÎñÆ÷¿Ø¼þLable½âÎö³Éhtml´úÂ룬ÊÇ <span id="label_Id">labelµÄÖµ </span>


ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), this.ClientID, " <script language=\"javascript\" type=\"text/javascript\"> if(confirm('ÐèÒªÖ±½ÓÌá½»Âð?')) {document.getElementById("btn_hide").innerText = "0";} else{document.getElementById("btn_hide").innerText = "0";} </script>", false);

ÌáʾÎÒÉÙ)ºÍ;
ÎÒ²»ÖªµÀÄÄÉÙÁË

"btn_hide"
¸Ä³É
\"btn_hide\"


Ïà¹ØÎÊ´ð£º

ASPÖÐÓÃJavascriptµ÷Óúǫ́Êý×éÎÊÌ⣬¼±°¡~~~~~~~~~~

ÎÒÔÚºǫ́¶¨ÒåÁË£º
  public string[] a;
  ²¢½«Æä¸³ÖµÁË¡£
È»ºóÔÚJavascriptÀïÃæÓÃalert(" <%=a[1]%>")µÄ·½·¨¿ÉÒÔÊä³öaÖеÄÈÎÒâÊý¾Ý£¬µ«ÊÇ
ÎÒ¶¨ÒåÁË
var w=new Array(); ......

ASPºǫ́´úÂëµ÷ÓÃǰ̨µÄJavaScript´úÂë

ÔÚaspÖÐÓÐÔËÓÃAJAXµÄʱºò£¬ÎÒÔÚ·þÎñÆ÷¿Ø¼þÈ·¶¨°´Å¥µã»÷ºó´¦ÀíһЩÊÂÇ飬½ÓÏÂÀ´¾ÍÊÇÒªµ÷ÓÃǰ̨µÄJavaScriptµÄº¯Êý£¬ÔõôŪ
C# code:
button.Attributes.Add("onclick", "xx()");

ÒýÓÃ
C ......

javascriptµ÷ÓÃphp±äÁ¿ÎÊÌâ

Çë´ó¼Ò×¢Òâ¿´Çå³þÎÊÌâ,²»ÊÇÒ»°ãÍøÉÏÌÖÂÛµÄÎÊÌâ:
ÔÚindex.phpÖÐÒýÓÃjsÎļþ
<script src='index.js'> </script>
¶øÔÚindex.jsÖÐÊÇÔõÑùÒýÓÃindex.phpÖÐphpµÄ±äÁ¿µÄÖµµÄÄØ?

ÏÖÔÚÎÒ ......

javascript »òÕß Jsp ÈçºÎʵÏÖµ¯³ö±£´æÎļþ¶Ô»°¿òÄØ

javascript »òÕß Jsp ÈçºÎʵÏÖµ¯³ö±£´æÎļþ¶Ô»°¿òÄØ£¿ ÎÒÊÇ´òË㽫JspÒ³Ãæ»òµÃµ½µÄ²ÎÊý±£´æµ½±¾µØ¡£±ÈÈç˵£¬·þÎñÆ÷¶Ë·µ»ØÁËÒ»¸öxmlÎļþ£¬ÎÒÏë°ÑËüµÄÄÚÈݱ£´æÏÂÀ´£¬µ«Õâ²»ÊÇÏÂÔØ£¬¶øÊÇʹÓÃä¯ÀÀÆ÷ÔÚ±¾µØ´´½¨Ò»¸öÎļþ£¬½ ......

JavaScriptÓëjspµ÷ÓÃ

Çë½Ì....
°ÑJavaScriptÖ±½ÓдÔÚjspÒ³ÃæÖØµ÷ÓñȽϺÃÄØ  »¹ÊǰÑJavaScriptд³É.jsÎļþ È»ºóÔÚjspÒ³ÃæÖе÷Óà ºÃÄØ

ÎªÊ²Ã´ÄØ
¸öÈ˾õµÃµ÷ÓñȽϺᣡ£¡£

°ÑJavaScriptд³É.jsÎļþ  ÕâÑù±È½ÏºÃ~ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ