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

¹ØÓÚ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);



ÒýÓÃ
http://topic.csdn.net/u/20090913/11/da9afa35-768c-4f12-8157-80295b5fc2c0.html?98991

²»ÂÛvar ÔÚÄÄ£¬¶¼»á±»ÌáÉýµ½Óï¾ä×îÇ°,,,,



¾«±Ù£¡¶ÔÄãµÄ¾´ÑöÈçÌÏÌϽ­Ë®Á¬Ã಻¾ø~

Â¥Ö÷Ö»Òª¼ÇסJSÖгýÁËvarÉùÃ÷µÄ±äÁ¿Í⻹ÓÐfunctionÉùÃ÷µÄº¯Êý¶¼»áÔÚÖ´Ðнű¾Ç°ÏȽøÐÐÔ¤±àÒë¡£
È磺
      <script type="text/javascript">
    f();//½á¹ûÊÇundefined
    function f(){
  alert(a);      
  var a;//Ô¤±àÒëʱvar±äÁ¿³õʼֵΪundef


Ïà¹ØÎÊ´ð£º

aspÖÐÓÃjavascript¶¯Ì¬¸Ä±äImageµÄsrcµÄ·¾¶ÎÊÌâ

<form id="form1" runat="server">
  <div>
  <script type="text/javascript">
  function oo(a){
  document.getEleme ......

C#дJAVASCRIPT Êý×é

C#дJAVASCRIPT Êý×é

      protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
& ......

ʹÓÃjavascriptÖеÄdomÀ´Ð´´úÂ룬»áµÄÇë½ø,¼±

HTML code:

<input type="button" value="11" onclick="test()" />
<tr>
<td >123</td>
<td>33</td>
</tr> ......

javascript ÈçºÎÉèÖÃbodyµÄÊôÐÔ

ÎÒÏëÉèÖÃbodyÖеÄÊý¾Ý¾àÀëä¯ÀÀÆ÷×ó±ß¿òÒ»¶¨¾àÀëʹÓÃmargin-left¿ÉÒÔÉèÖ㬵«ÊÇÎÒÏ£ÍûÕâ¸öÖµÊǼÆËã³öÀ´µÄ£¬Ò²¾ÍÊÇҪʹÓÃJavaScript¼ÆËãÒ»ÏÂÈ»ºóÔÙʹbodyÏÔʾ½á¹û¡£²»ÖªµÀ¸ÃÔõôÉèÖã¬Ôõôµ÷Óã¬Ï£Íû´ó¼Ò°ïÖúһϣ¬¸ø¸ ......

JavaScriptÕýÔò±í´ïʽ

JScript code:
function isDigit(s)
{
var patrn=/^[0-9]{1,20}$/;
if (!patrn.exec(s)) return false
return true
}

Ϊʲô²»Êdz¤¶ÈСÓÚ20µÄÒÔÊý×Ö¿ªÍ·µÄ×Ö·û´®
¶øÊdz¤¶ÈСÓÚ20µÄÈ«ÓÉÊý×Ö×é³É

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ