¹ØÓÚJavaScriptµÄСÎÊÌâ
JScript code:
var a="aa";
function ff(){
a="c";
if(false)
{
var a;
}
}
ff();
alert(a);
ΪʲôÒÔÉÏЧ¹û²âÊÔ³öÀ´µÄÊÇifÓï¾ä¿éÖ´ÐкóµÄЧ¹û£¬if(false)Ó¦¸Ã²»»áÖ´Ðе½ºóÃæµÄÓï¾ä°¡£¿
ÕâµãºÜÊDz»Ã÷°× Íû´ó¼Ò´Í½ÌһϠлл
ÓÉÓÚÉùÃ÷µÄvar a£¬±àÒëµÄʱºòÒѾ°Ñº¯ÊýÄÚµÄaµ±³É¾Ö²¿±äÁ¿ÁË
Ó¦¸ÃÊDZàÒë˳ÐòÎÊÌ⣬ÓÃÔ¤±àÒëÈçÏ£¬ ¾ÍµÃµ½cÁË
JScript code:
var a="aa";
function ff(){
a="c";
@if(false)
{
var a;
}
@end
}
ff();
alert(a);
¾«±Ù£¡¶ÔÄãµÄ¾´ÑöÈçÌÏÌϽˮÁ¬Ã಻¾ø~
Â¥Ö÷Ö»Òª¼ÇסJSÖгýÁËvarÉùÃ÷µÄ±äÁ¿Í⻹ÓÐfunctionÉùÃ÷µÄº¯Êý¶¼»áÔÚÖ´Ðнű¾Ç°ÏȽøÐÐÔ¤±àÒë¡£
È磺
<script type="text/javascript">
f();//½á¹ûÊÇundefined
function f(){
alert(a);
var a;//Ô¤±àÒëʱvar±äÁ¿³õʼֵΪundef
Ïà¹ØÎÊ´ð£º
<form id="form1" runat="server">
<div>
<script type="text/javascript">
function oo(a){
document.getEleme ......
C#дJAVASCRIPT Êý×é
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
& ......
HTML code:
<input type="button" value="11" onclick="test()" />
<tr>
<td >123</td>
<td>33</td>
</tr>
......
ÎÒÏëÉèÖÃbodyÖеÄÊý¾Ý¾àÀëä¯ÀÀÆ÷×ó±ß¿òÒ»¶¨¾àÀëʹÓÃmargin-left¿ÉÒÔÉèÖ㬵«ÊÇÎÒÏ£ÍûÕâ¸öÖµÊǼÆËã³öÀ´µÄ£¬Ò²¾ÍÊÇҪʹÓÃJavaScript¼ÆËãÒ»ÏÂÈ»ºóÔÙʹbodyÏÔʾ½á¹û¡£²»ÖªµÀ¸ÃÔõôÉèÖã¬Ôõôµ÷Óã¬Ï£Íû´ó¼Ò°ïÖúһϣ¬¸ø¸ ......
JScript code:
function isDigit(s)
{
var patrn=/^[0-9]{1,20}$/;
if (!patrn.exec(s)) return false
return true
}
Ϊʲô²»Êdz¤¶ÈСÓÚ20µÄÒÔÊý×Ö¿ªÍ·µÄ×Ö·û´®
¶øÊdz¤¶ÈСÓÚ20µÄÈ«ÓÉÊý×Ö×é³É
......