jsÖÐwindow¹¤¾ßÓÐÄÄЩ
javascript ÖÐµÄ window ¹¤¾ßÊÇËùÓÐÈ«¾Ö¹¤¾ßµÄ¸¸¹¤¾ß£¬Ìṩ¶Ôä¯ÀÀÆ÷¡¢Ò³ÃæºÍÎĵµµÄ»á¼û¡£ Ëü¿ÉÓÃÓÚ£º»á¼ûä¯ÀÀÆ÷ÐÅÏ¢£¨°æ±¾¡¢Óû§ÊðÀí×Ö·û´®µÈ£©¡£²Ù×÷Ò³ÃæºÍÎĵµ£¨¼ÓÔØ¡¢Ð¶ÔØÎĵµ£¬»ñÈ¡ÔªËØ£¬ÐÞ¸ÄÎÊÌ⣩¡£¿ØÖÆ´°¿ÚÐÐΪ£¨·¿ª¡¢¹Ø±Õ¡¢µ÷½â¾Þϸ¡¢Òƶ¯´°¿Ú£©¡£ÊÂÎñ´¦Àí£¨¼àÌýºÍ´¦ÀíÊÂÎñ£©¡£×¼Ê±Æ÷£¨ÔÚһ׼ʱ¼ä¾àÀëºóÖ´ÐдúÂ룩¡£´æ´¢Êý¾Ý£¨Í¨¹ý localstorage ºÍ sessionstorage ÊôÐÔ£©¡£
JavaScript ÖÐµÄ Window ¹¤¾ß
ÔÚ JavaScript ÖУ¬window ¹¤¾ßÊÇÒ»¸öÈ«¾Ö¹¤¾ß£¬Ëü´ú±íä¯ÀÀÆ÷´°¿Ú»ò°üÀ¨ÎĵµµÄ¿ò¼Ü¡£ËüÊÇËùÓÐÆäËûÈ«¾Ö¹¤¾ßµÄ¸¸¹¤¾ß£¬ÌṩÁ˶Ôä¯ÀÀÆ÷¡¢Ò³ÃæºÍÎĵµµÄ»á¼û¡£
Window ¹¤¾ßµÄ×÷ÓÃ
Window ¹¤¾ßÖ÷ÒªÓÃÓÚÒÔÏÂÄ¿µÄ£º
»á¼ûä¯ÀÀÆ÷ÐÅÏ¢£º»ñÈ¡ä¯ÀÀÆ÷°æ±¾¡¢Óû§ÊðÀí×Ö·û´®¡¢ÆÁÄ»Çø·ÖÂʵȡ£
²Ù×÷Ò³ÃæºÍÎĵµ£º¼ÓÔغÍжÔØÎĵµ¡¢»ñÈ¡ÎĵµÔªËØ¡¢ÐÞ¸ÄÎÊÌâºÍ URL¡£
¿ØÖÆ´°¿ÚÐÐΪ£º·¿ª¡¢¹Ø±Õ¡¢µ÷½â¾ÞϸºÍÒƶ¯´°¿Ú¡£
ÊÂÎñ´¦Àí£º¼àÌýºÍ´¦ÀíÒ³ÃæºÍ´°¿ÚÉϵÄÊÂÎñ£¬ÀýÈç¼ÓÔØ¡¢Ð¶ÔØ¡¢µ¥»÷ºÍת¶¯¡£
׼ʱÆ÷£ºÊ¹Óà setTimeout() ºÍ setInterval() ÒªÁìÔÚһ׼ʱ¼ä¾àÀëºóÖ´ÐдúÂë¡£
´æ´¢Êý¾Ý£ºÍ¨¹ý localStorage ºÍ sessionStorage ÊôÐÔ´æ´¢Êý¾Ý¡£
Window ¹¤¾ßµÄÊôÐÔ
Window ¹¤¾ßÌṩÁË´ó×ÚµÄÊôÐÔ£¬°üÀ¨£º
document£ºÖ¸ÏòÄ¿½ñÎĵµµÄ Document ¹¤¾ß¡£
location£ºÖ¸ÏòÄ¿½ñ URL µÄ Location ¹¤¾ß¡£
navigator£ºÌṩÓйØä¯ÀÀÆ÷ºÍÓû§ÊðÀíµÄÐÅÏ¢¡£
screen£ºÌṩÓйØÆÁÄ»³ß´çºÍÇø·ÖÂʵÄÐÅÏ¢¡£
history£ºÌṩÓйØä¯ÀÀÀúÊ·¼Í¼µÄÐÅÏ¢¡£
localStorage£ºÓÃÓÚÓÀÊÀ´æ´¢Êý¾ÝµÄ localStorage ¹¤¾ß¡£
sessionStorage£ºÓÃÓÚÔڻỰʱ´ú´æ´¢Êý¾ÝµÄ sessionStorage ¹¤¾ß¡£
Window ¹¤¾ßµÄÒªÁì
Window ¹¤¾ß»¹ÌṩÁËһЩҪÁ죬°üÀ¨£º
alert()£ºÏÔʾ¾¯±¨¶Ô»°¿ò¡£
confirm()£ºÏÔʾȷÈ϶Ի°¿ò¡£
prompt()£ºÏÔʾÌáÐѶԻ°¿ò¡£
open()£º·¿ªÒ»¸öеÄä¯ÀÀÆ÷´°¿Ú»òÑ¡Ï¡£
close()£º¹Ø±ÕÄ¿½ñ´°¿Ú»òÑ¡Ï¡£
setTimeout()£ºÔÚָ׼ʱ¼äºóÖ´ÐдúÂë¡£
setInterval()£ºÃ¿¸ôָ׼ʱ¼äÖ´ÐдúÂë¡£
ÒÔÉϾÍÊÇjsÖÐwindow¹¤¾ßÓÐÄÄЩµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡