- ÀàÐÍ£ºä¯ÀÀÆ÷Àà´óС£º21.7MÓïÑÔ£ºÖÐÎÄ ÆÀ·Ö£º3.8
- ±êÇ©£º
½ñÌìÓÃIE´ò¿ª soso µÄʱºòÌáʾ:
Internet Explorer ÎÞ·¨´ò¿ª xxxxxxx ÒÑÖÕÖ¹²Ù×÷
µ«ÊÇÓà FireFox ¾Í¿ÉÒÔ·ÃÎÊ¡£¹ÖÊÂÁË ÓñðµÄIEÄÚºËä¯ÀÀÆ÷Ò²ÊÇÒ»ÑùÇé¿ö
ÒÔÇ°×ö¹ýµÄÏîÄ¿ÓÉÓÚÌí¼ÓÁËÔÚÏßͳ¼Æϵͳ¡£½á¹ûÔÚFirefoxϲâÊÔÕý³££¬IEÏÂÈ´Ìáʾ¡°ÎÞ·¨´ò¿ªInternetÕ¾µã ÒÑÖÕÖ¹²Ù×÷¡±µÄ´íÎó¡£Ò»¿ªÊ¼Ò²ÃÉÁË£¬ÔÚÍøÂçÉÏÕÒÁ˺ܶà½â¾ö·½·¨¡£×îÖÕʹÎÊÌâµÃÒÔÍêÃÀ½â¾ö£¬×ܽáÈçÏ¡£
ÔÚIEÏÂ,µ±Ò³Ã滹ûÓмÓÔØÍêȫʱ,Èç¹ûÕýÔÚÖ´ÐеÄJS´úÂëÖк¬ÓÐʹÓÃÁËdocument.createElementµÄ»°,ºÜÈÝÒ×ÒýÆðÒ³Ãæ¼ÓÔØʧ°Ü¡£µ¼ÖÂÌáʾ"internet explore ÎÞ·¨´ò¿ªinternetÕ¾µã http://www.xxx.com/xxx.html ÒÑÖÕÖ¹²Ù×÷"¡£
ÕâÊÇÒòΪÔÚIEÏÂ,ÔÚ¼ÓÔØÎĵµµÄ¹ý³ÌÖÐ,Õû¸öHTMLÎĵµµÄDOM½á¹¹ÉÐδÉú³ÉÍêÕû,¶ø´ËʱÕýÔÚÖ´ÐеÄJS¾ÍÒÑ´´½¨³öеÄDOM½áµãÁË,ÖÂʹDOMÊ÷µÄ½á¹¹·¢ÉúÎÉÂÒ¡£
½â¾ö·½·¨´ó¸ÅÓÐÁ½ÖÖ:
¡¡1¡¢¼ÓÔØÍê³ÉÅжÏ
¡¡¡¡¡¡ if (document.readyState=="complete"){
¡¡¡¡¡¡¡¡¡¡....
¡¡¡¡¡¡ }else{
¡¡¡¡¡¡¡¡¡¡document.onreadystatechange=function(){
¡¡¡¡¡¡¡¡¡¡if(document.readyState=="complete")...;
¡¡¡¡¡¡ }
¡¡2¡¢¼ÓÔØÍêºóÖ´ÐÐ
¡¡¡¡¡¡window.onload=function(){
¡¡¡¡¡¡¡¡ ...
¡¡¡¡¡¡}
<!--2
×ö¿ª·¢Ê±»áÅöµ½¡°Internet ExplorerÎÞ·¨´ò¿ªinternetÕ¾µãÎļþ.....²Ù×÷ÖÕÖ¹¡±£¬»¹ÎÞ·¨µ÷ÊÔ£¬Ö÷ÒªÊǼÓÔØÒ³Ãæʱ½Å±¾ÒýÆðDOMÎÉÂÒÔì³ÉµÄ¡£
Ä¿Ç°ÎÒÖªµÀµÄ»á³öÏÖ´ËÎÊÌâµÄÇé¿ö£º
1. ÔÚDOM¼ÓÔØÍê֮ǰ½øÐÐÁËÔö¼Óɾ³ý½ÚµãµÄ²Ù×÷£¬ÀýÈçappendChild£¬removeChild¡£innerHTML²Ù×÷Ä¿Ç°»¹Ã»·¢ÏÖÓÐÕâ¸öÎÊÌâ¡£
½â¾ö°ì·¨£ºÔÚjQuery(document).ready()»òÕßÔÚbodyµÄonloadʼþÀïÖ´ÐÐÕâЩ²Ù×÷¡£
2. head°üº¬<base target="_blank"/>£¬ÓжÔhead¶ÔÏóµÄDOM²Ù×÷Ò²»á³öÏÖÕâ¸öÎÊÌâ¡£
½â¾ö°ì·¨£º1)<base target="_blank"/>¸ÄΪ<base target="_blank"></base>£¬Ã»ÕÒµ½Ïà¹Ø×ÊÁϽâÊÍÕâ¸öÎÊÌâ¡£
2)ʹÓÃhead.insertBeforeChild()´úÌæappendChild£¬insertBeforeChild²»»áÔì³ÉDOMÎÉÂÒ¡£
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/wangjj_016/archive/2010/02/10/5304780.aspx
ASP.NETÒ³ÃæPostBackºóÏòÒ³ÃæÌí¼ÓÁËjs½Å±¾£¬js½Å±¾ÓÖ¶ÔDOM¶ÔÏó½øÐÐÁ˲Ù×÷£¬¶øDOMÓÖû¼ÓÔØÍê±Ï£¬µ¼ÖÂä¯ÀÀÆ÷Öжϡ£ÓÚÊdzöÏÖ¡°Internet ExplorerÎÞ·¨´ò¿ªÕ¾µã,ÒÑÖÕÖ¹²Ù×÷¡±µÄ´íÎó¡£
½â¾ö·½·¨£º
1. ÔÚDOM¼ÓÔØÍê³ÉÖ®ºóÔÙÖ´ÐÐjs²Ù×÷£»
2. ÓÃjQuery£¬$(function() {function doit(){};}); ±£Ö¤js½Å±¾ÔÚDOM¼ÓÔØÍê±ÏÖ®ºóÖ´ÐС£
Õâ¸ö¿ÉÄÜÊÇÎÒ×Ô¼º·¢Éñ¾¸ã³öÀ´µÄ¸öÎÊÌâ°É.¿ªÊ¼ÀÁµÃ×ö£¬¼òµ¥Óúǫֱ́½Ó¸øÒ»¸ö¼ÓÁËrunat="server"µÄdiv¸³Öµ¡£×îºóÓÖÏëÓÃjquery¡£½á¹û»ìµ½Ò»Æð£¬×Ô¼ºÏÈÔÎÁË¡£
ÌùÉÏÏÈ,
GetAllFile(0);//×îºóÊǽ«Æ´³öÀ´µÄhtml´úÂë´«¸øǰ̨һ¸ödiv
RegisterStartupScript(FN, "<script>out(1);</script>");
ÕâÑùдÄØÒ»Ö±¾Í»á±¨´í
ºóÀ´¿´ÁËÏ£¬¾õµÃ¿ÉÄÜÊÇÒòΪǰ̨»¹ÓÐÆäËûµÄÊý¾Ýδ¼ÓÔØÍêÈ«£¬¾Í¸Ä±äÁËdivµÄInnerHTML°É¡£
×îºó´úÂ룺
RegisterStartupScript(FN, "<script defer=true>out(1);</script>"); //µ±Ò³Ãæ¼ÓÔØÍêʱµ÷ÓÃ
GetAllFile(0);//µ÷Ó÷½·¨__Ôٸıähtml