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

ÈÃeval()È«¾Ö×÷ÓÃÓòÖ´Ðеķ½·¨ÉîÈëÑо¿(javascript)

 
eval(str)
ÓÃÀ´´«ÈëÒ»¸ö×Ö·û´®¶¯Ì¬Ö´ÐÐÒ»¶Î½Å±¾£¬Õâ¸ö·½·¨·Ç³£ÓÐÓᣵ±Ö±½ÓÓÃeval()ʱ£¬×÷ÓÃÓòΪµ±Ç°×÷ÓÃÓò£¬ÓÐʱºòÎÒÃÇÐèÒªÈÃËüÔÚÈ«¾Ö×÷ÓÃÓò·¶Î§ÄÚÖ´ÐУ¬±ÈÈç
ajax·µ»ØµÄ½Å±¾×Ö·û´®£¬È»¶øä¯ÀÀÆ÷¶ÔevalµÄ²îÒì¿ÉÄÜʹÊÂÇé¸Õ¿ªÊ¼²¢²»ÊÇÄÇô˳Àû£¬±¾ÎÄͨ¹ýÔÚ7ÖÖä¯ÀÀÆ÷(IE, Firefox,
Chrome, Safari, Opera£©»·¾³ÖвâÊÔ£¬²¢Ìá³öÈýÖÖ½â¾ö·½°¸£¬Ê¹Õâ¸öÎÊÌâ±È½ÏÍêÃÀµÄ½â¾ö¡£
¿´ÕâÒ»¶Îjavascript´úÂ룺
function
xx(){

 
  var
x=
1
;
    window
.eval(
'var x=3;'
);
    document
.writeln(x);
}
xx();

ÔÚÄã×Ô¼º²âÊԺͿ´ÎÒ½ÓÏÂÀ´µÄ·ÖÎö֮ǰ£¬ÏÈÏëÏ룬ÄãÈÏΪÊä³ö½á¹û»áÊÇʲôÄØ£¿ÊÇ1»¹ÊÇ3£¿
¸ù¾Ý±¾ÎĵıêÌ⣬¿ÉÖª¿Ï¶¨ÊÇÔÚ²»Í¬ä¯ÀÀÆ÷ÏÂÓв»Í¬±íÏֵġ£
ÒÔÏÂÊÇÎÒµÄʵ²âÊý¾Ý£º
JS´úÂë
function
xx(){

    var
x=
1
;


    window
.eval
(
'var x=3;'
);

    document
.writeln
(x);

}

xx();
ä¯ÀÀÆ÷
IE
IE
Firefox
Chrome
Chrome
Safari
Opera
°æ±¾
7.0
8.0
3.0.8
1.0
4.0
4.0.2
9.62
ÔËÐнá¹û
3
3
1
3
1
1
1
¿É¼û¸÷ä¯ÀÀÆ÷¼°°æ±¾¶Ôwindow.eval()µÄ×÷ÓÃÓò´¦ÀíÊÇÓвîÒìµÄ¡£
IEÖУ¬window.eval()ºÍeval()Ò»ÑùÖ»ÔÚµ±Ç°×÷ÓÃÓòÉúЧ¡£
Firefox£¬Safari£¬OperaÖУ¬Ö±½Óµ÷ÓÃeval()Ϊµ±Ç°×÷ÓÃÓò£¬window.eval()µ÷ÓÃΪȫ¾Ö×÷ÓÃÓò¡£
ÓÈÆäÖµµÃ×¢ÒâµÄÊÇ£¬Google Chrome µÄ²»Í¬°æ±¾Ö®¼ä¶ÔÓÚevalµÄ´¦ÀíÒ²ÓвîÒì¡£
Èç¹ûÐèÒªÔÚÈ«¾Ö×÷ÓÃÓòeval()µÄЧ¹û£¬ÇÒͨÓÃÓÚËùÓÐä¯ÀÀÆ÷£¬ÄǾ͵úúñäͨһÏÂÁË¡£
·½·¨Ö®Ò»£º
ʹÓÃIEרÓеÄwindow
.execScript
¡£
Èç¹ûÄãÅöµ½Õâ¸öÎÊÌâ²»ÖªËù´ë£¬²¢ÉÏÍøËÑË÷£¬Õâ¸ö·½·¨´ó¸ÅÊÇ×îÏÈÒ²¼¸ºõΨһÄÜËÑË÷µ½µÄ·½·¨¡£
window
.execScript
(sExpression
,
sLanguage
)¡£
±ÈÈçÉÏÃæÄÇÒ»¶Î´úÂëÖÐevalÒ»¾äÈç¹û»»³Éwindow
.execScript(
'var x=3;'
);
IEÖеÄÔËÐнá¹û¾ÍÊÇ1ÁË¡£
·ÇIEÄں˵Ää¯ÀÀÆ÷²¢²»Ö§³Öwindow
.execScript
¡£
IEÖ®ËùÒÔÓÐÕâ¸öwindow
.execScript
£¬»¹ºÍIEÄܹ»Ö´ÐÐÆäËûÓïÑԵĽű¾Óйأ¬Í¨¹ý¸ø²»Í¬µÄsLanguage
²ÎÊý£¬IEÕâ¸ö·½·¨³ýÄܹ»Ö´ÐÐjavascriptÖ®Í⣬»¹¿ÉÒÔÖ´ÐÐvbscript»òÊÇÆäËûÈκΰ²×°¹ýÏàÓ¦½âÊÍÒýÇæµÄ½Å±¾Èçperl,pythonµÈ¡£
µ±ÐèÒªÔÚ¾Ö²¿»·¾³ÖÐÖ´ÐеÄʱºò£¬ÎÒÃǾÍÖ±½ÓÓÃeval()¡£
µ±ÐèÒªÔÚÈ«¾Ö»·¾³ÖÐÖ´ÐеÄʱºò£¬ÎÒÃÇ¿ÉÒÔ·â×°Ò»¸öͨÓõĺ¯Êý


Ïà¹ØÎĵµ£º

Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â

JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ£¬Èç½ñ JavaScript ¿âÔ½À´Ô½Ç¿´ó£¬¿ÉÒÔʤÈÎÐí¶à¸´ÔӵŤ×÷£¬È»¶øͬʱ£¬ÈËÃÇÔÚÖÚ¶à JavaScript ¿âÃæÇ°ÓÖ¾õµÃÎÞËùÊÊ´Ó£¬±¾ÎÄ£¬ÎÒÃǽ«Ê¹Óà Google ËÑË÷³öÅÅÃûÇ° 10 λµÄ JavaScript ¿â£¬²¢¶ÔËüÃÇÖðÒ»½øÐнéÉÜ¡£ ......

JavaScript ÁãÉ¢±Ê¼Ç

JavaScript ÁãÉ¢±Ê¼Ç
1 ´´½¨½Å±¾¿é
1: <script language=”JavaScript”>
2: JavaScript code goes here
3: </script>
2 Òþ²Ø½Å±¾´úÂë
1: <script language=”JavaScript”>
2: <!--
3: document.write(“Hello”);
4: // -->
5: </script>
ÔÚ²»Ö ......

ÈçºÎͨ¹ýJavaScriptº¯Êý»ñÈ¡Web±¨±íµ¥Ôª¸ñµÄÖµ

±¨±íÕ¹ÏÖÔÚwebÒ³ÃæÒÔºó£¬ÓÐʱÐèÒª»ñȡijµ¥Ôª¸ñµÄÖµ¡£ÈóǬ±¨±íÖпÉÒÔͨ¹ýÔÚjspÒ³ÃæÖÐÉ趨JavaScriptº¯ÊýÀ´ÊµÏÖÕâ¸ö¹¦ÄÜ¡£ÏÂÃæ¾Íͨ¹ýÒ»¸öÏÂÀý×Ó¼òµ¥½éÉÜÒ»ÏÂÈçºÎͨ¹ýJavaScriptº¯Êý»ñÈ¡Web±¨±íµ¥Ôª¸ñµÄÖµ¡£
Ê×ÏÈ£¬½«·¢²¼±¨±íµÄjspÒ³ÃæÖеı¨±í±êÇ©<report:html>·ÅÔÚÒ»¸ö<table>±êÇ©ÖУ¬ÈçÏÂͼ
ÆäÖÐ<report:h ......

Top 10 JavaScript Frameworks by Google

 À´×Ô£ºhttp://www.tripwiremagazine.com/tools/developer-toolbox/top-10-javascript-frameworks-by-google.html
Wed, Nov 11, 2009
Development
, Javascript
, Tools




JavaScript – an indispensable part for developing websites and web
pages, whether th ......

firefoxÓëIE¼æÈÝjavascriptºÍCSS


css:
1.   
ul±êÇ©ÖÐFFÖÐÓиöpaddingÖµ£¬È´Ã»ÓÐmarginÖµ£¬¶øÔÚIEÖÐÕýºÃÏà·´   
½â¾ö°ì·¨:½«ulµÄpaddingºÍmargin¶¼ÉèΪ0(Ò²¿ÉÒÔ²»ÊÇ0)È磺padding:0;margin:0;list-style:none;   
ÁíÍâformĬÈÏÔÚIEÖÐÒ²»áÓÐmarginÖµ£¬ËùÒÔ×îºÃÒ²½«ÆämarginºÍpaddingÉèΪ0   
2.    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ