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

javaScript eval()º¯ÊýÓ÷¨

eval()º¯Êý
   
   JavaScriptÓÐÐí¶àСÇÏÃÅÀ´Ê¹±à³Ì¸ü¼ÓÈÝÒס£
   ÆäÖÐÖ®Ò»¾ÍÊÇeval()º¯Êý£¬Õâ¸öº¯Êý¿ÉÒÔ°ÑÒ»¸ö×Ö·û´®µ±×÷Ò»¸öJavaScript±í´ïʽһÑùÈ¥Ö´ÐÐËü¡£
   ¾Ù¸öСÀý×Ó£º
   
   var the_unevaled_answer = "2 + 3";
   var the_evaled_answer = eval("2 + 3");
   alert("the un-evaled answer is " + the_unevaled_answer + " and the evaled answer is " + the_evaled_answer);
   
   Èç¹ûÄãÔËÐÐÕâ¶Îeval³ÌÐò, Ä㽫»á¿´µ½ÔÚJavaScriptÀï×Ö·û´®"2 + 3"ʵ¼ÊÉϱ»Ö´ÐÐÁË¡£
   ËùÒÔµ±Äã°Ñthe_evaled_answerµÄÖµÉè³É eval("2 + 3")ʱ, JavaScript½«»áÃ÷°×²¢°Ñ2ºÍ3µÄºÍ·µ»Ø¸øthe_evaled_answer¡£
   Õâ¸ö¿´ÆðÀ´ËƺõÓеãɵ£¬Æäʵ¿ÉÒÔ×ö³öºÜÓÐȤµÄÊ¡£±ÈÈçʹÓÃevalÄã¿ÉÒÔ¸ù¾ÝÓû§µÄÊäÈëÖ±½Ó´´½¨º¯Êý¡£
   Õâ¿ÉÒÔʹ³ÌÐò¸ù¾Ýʱ¼ä»òÓû§ÊäÈëµÄ²»Í¬¶øʹ³ÌÐò±¾Éí·¢Éú±ä»¯£¬Í¨¹ý¾ÙÒ»·´Èý£¬Äã¿ÉÒÔ»ñµÃ¾ªÈ˵ÄЧ¹û¡£
   ÔÚʵ¼ÊÖУ¬evalºÜÉÙ±»Óõ½£¬µ«Ò²ÐíÄã¼û¹ýÓÐÈËʹÓÃevalÀ´»ñÈ¡ÄÑÒÔË÷ÒýµÄ¶ÔÏó¡£
   
   Îĵµ¶ÔÏóÄ£ÐÍ£¨DOM)µÄÎÊÌâÖ®Ò»ÊÇ:ÓÐʱÄãÒª»ñÈ¡ÄãÒªÇóµÄ¶ÔÏó¼òÖ±¾ÍÊÇÍ´¿à¡£
   ÀýÈ磬ÕâÀïÓÐÒ»¸öº¯ÊýѯÎÊÓû§Òª±ä»»ÄĸöͼÏó:±ä»»ÄĸöͼÏóÄã¿ÉÒÔÓÃÏÂÃæÕâ¸öº¯Êý£º
   
   function swapOne()
   {
   var the_image = prompt("change parrot or cheese","");
   var the_image_object;
   
   if (the_image == "parrot")
   {
   the_image_object = window.document.parrot;
   }
   else
   {
   the_image_object = window.document.cheese;
   }
   
   the_image_object.src = "ant.gif";
   }
   
   Á¬Í¬ÕâЩimage±ê¼Ç:
   
   
   [img src="http://a.com/a.gif" name=&q


Ïà¹ØÎĵµ£º

javascriptºËÐÄѧϰ±Ê¼Ç

±äÁ¿
1.       Èç¹ûûÓÐÓÃvarÓï¾ä¸øÒ»¸ö±äÁ¿¶¨³õʼֵ£¬ËüµÄ³õʼֵ¾ÍÊÇundefined.
2.       ³¢ÊÔ¸øδÓÃvarÉùÃ÷µÄ±äÁ¿¸³Öµ£¬JavaScript»áÒþʽÉùÃ÷¸Ã±äÁ¿¡£µ«ÊÇ£¬ÒþʽÉùÃ÷µÄ±äÁ¿×ÜÊDZ»´´½¨ÎªÈ«¾Ö±äÁ¿£¬¼´Ê¹¸Ã±äÁ¿Ö»ÔÚÒ»¸öº¯ÊýÌåÄÚʹÓá£
3.    ......

javascriptÖеÄ×Ö·û´®±àÂëת»»

ÆðÒò£º
×Ô¶¨ÒåµÄÒ»¸öspiderÔÚץȡÀ´µÄÊý¾ÝÖУ¬Óи÷ʽ¸÷ÑùµÄÊý¾Ý´æ´¢±àÂ룬ÓÐЩ±àÂëÊÇ \uxxxx\uxxxx µÄ·½Ê½,Õâ¾ÍÉæ¼°µ½Ò»¸öunicodeµ½¿É¼û×Ö·ûµÄת»»£¬±ÈÈçת»»Îªgb2312£¬ÕâÑù²ÅÄÜ·½±ãÎÒÃÇÀ뿪ä¯ÀÀÆ÷ºóÒ²ÄÜÔĶÁ¡£
ÔÚÍøÉÏÕÒÁ˺ܶà´Î·½ÃæµÄ±àÂëת»»¶ÔÕÕ±í£¬²»¹ý¼¸ºõûÓÐÒ»¸öÍêÕû£¬ËùÒÔ×Ô¼ºÕûÀíÁËÒ»·Ý£¬Ï£Íû¶Ô´ó¼ÒÓаïÖú¡£Ëü°ü ......

JavaScript³£Óõĺ¯Êý

      javascriptÌṩÁËÐí¶àº¯Êý¹©¿ª·¢ÈËԱʹÓã¬ÏÂÃæ¸ø³öÒ»¸ö¼òµ¥½éÉÜ£¬¸üÏêϸµÄÐÅÏ¢Çë²Î¿¼Visual InterDevÌṩµÄÔÚÏß°ïÖú¡£
¡¡¡¡javascriptº¯ÊýÒ»¹²¿É·ÖΪÎåÀࣺ
¡¡¡¡·³£¹æº¯Êý
¡¡¡¡·Êý×麯Êý
¡¡¡¡·ÈÕÆÚº¯Êý
¡¡¡¡·Êýѧº¯Êý
¡¡¡¡·×Ö·û´®º¯Êý
¡ ......

JavaScriptÌØЧ£ººáÏò²»¼ä¶Ï¹ö¶¯

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ºáÏò²»¼ä¶Ï¹ö¶¯Í¼Æ¬</title>
<meta http- ......

JavaScriptÓëC#Ö®¼äº¯ÊýÓë±äÁ¿µÄÏ໥µ÷Óã¨×ª£©

ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
 
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ;
  &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ