ÓÃJavaScriptʵÏÖ¸ü¸´ÔӵĽ»»¥ [9]
Ò»¡¢Ê²Ã´ÊÇ¿ò¼Ü
¡¡¡¡¿ò¼ÜFrames×îÖ÷Òª¹¦ÓÃÊÇ"·Ö¸î"ÊÓ´°£¬Ê¹Ã¿¸ö"СÊÓ´°"ÄÜ
ÏÔʾ²»Í¬µÄHTM
LÎļþ£¬²»Í¬¿ò¼ÜÖ®¼ä¿ÉÒÔ»¥¶¯(interact)£¬Õâ¾ÍÊÇ˵²»Í¬¿ò¼ÜÖ®¼ä¿ÉÒÔ½»»»Ñ¶Ï¢Óë×ÊÁÏ¡£ÀýÈç:¼ÙÉèÄú¿ªÁËÁ½¸öframes£¬µÚÒ»¸öframe¿ÉÏÔ
ʾÊéµÄĿ¼£¬µÚ¶þ¸öframeÔòÏÔʾÕ½ڵľßÌåÄÚÈÝ¡£
¡¡¡¡¿ò¼Ü¿ÉÒÔ½«ÆÁÄ»·Ö¸î³É²»Í¬µÄÇøÓò£¬Ã¿¸öÇøÓòÓÐ×Ô¼ºµÄURL£¬Í¨¹ýFrames[]Êý×é¶Ô
ÏóÀ´ÊµÏÖ²»Í¬¿ò¼ÜµÄ·ÃÎÊ¡£Êµ¼ÊÉÏ¿ò¼Ü¶ÔÏó±¾ÉíÒ²Ò»Àà´°¿Ú£¬Ëü¼Ì³ÐÁË´°¿Ú¶ÔÏóµÄËùÓÐÌØÕ÷£¬²¢ÓµÓÐËùÓеÄÊôÐԺͷ½·¨¡£ÏÂÃæÎÒÃÇÏÈ¿´Ò»Ï¿ò¼ÜµÄÀý×Ó¡£¼ûͼ9-1
Ëùʾ¡£
ͼ9-1
¿ò¼Ü¶ÔÏó
<HTML>
<HEAD>
</HEAD>
<Frameset
Rows="20%,80%">
<frame src="test9_1.html">
<Frameset
Cols="50%,50%">
<frame src="test9_2.html">
<frame
src="test9_3.html">
</Frameset>
</Frameset>
</HTML>
¡¡
¡¡ÒÔÉÏHTML±êʶ½«ÆÁÄ»·Ö³ÉÈý¸ö¿ò¼Ü¡£ÏȽ«´°¿Ú·Ö³ÉÒÔ¶þÐÐΪµ¥Î»µÄ´°¿Ú£¬Ö®ºóÔÙ°´·Ö³É¶þ¸ö´°¿Ú¡£²¢ÔÚÏàÓ¦µÄ¿ò¼ÜÖзÅÈë×Ô¼ºµÄHTMLÎĵµ¡£
¡¡¡¡
ͨ¹ý[Framset ]¸æËßä¯ÀÀÆ÷ÄúÒªÉèÖü¸¸ö¿ò¼Ü£»rowsÕâÏî²ÎÊý¸æËßä¯ÀÀÆ÷ÄúÏ뽫ÊÓ´°·Ö¸î³É¼¸ÁУ»¶ø
colsÕâÏî²ÎÊýÊǸæËßä¯ÀÀÆ÷ÄúÏ뽫ÊÓ´°·Ö¸î³É¼¸ÐС£
¡¡¡¡¿ÉÒÔÓúܶà×éµÄ <frameset...> tags
½«ÊÓ´°·Ö¸îµÃ¸ü¸´ÔÓ¡£
¡¡¡¡¿ÉÒÔ¸øÿ¸öframeÒ»¸ö"Ãû×Ö" (name)¡£frameµÄÃû×ÖÔÚJavaScriptÓï·¨ÖеĵØλ·Ç³£ÖØÒª¡£
¡¡¡¡¡¡¡¡¿ÉÒÔÓà <src> ¸æËßä¯ÀÀÆ÷ÄúÒªÔØÈëÄÄÒ»¸ö HTMLÎļþ¡£
¶þ¡¢ÈçºÎ·ÃÎÊ¿ò¼Ü
¡¡¡¡ÔÚÇ°Ãæ
ÎÒÃǽéÉܹýʹÓÃdocument.forms[]ʵÏÖµ¥Ò»´°ÌåÖв»Í¬ÔªËصķÃÎÊ¡£¶øҪʵÏÖ¿ò¼ÜÖжരÌåµÄ²»Í¬ÔªËصķÃÎÊ£¬Ôò±ØÐëʹÓÃwindow¶ÔÏóÖеÄ
FramesÊôÐÔ¡£FramesÊôÐÔͬÑùÒ²ÊÇÒ»¸öÊý×飬ËûÔÚ¡¡¡¡¸¸¿ò¼Ü¼¯ÖÐΪÿһ¸ö×Ó¿ò¼ÜÉèÓÐÒ»Ïͨ¹ýϱêʵÏÖ²»Í¬¿ò¼ÜµÄ·ÃÎÊ:
parent.frames[Index1].docuement.forms[index2]
¡¡
¡¡Í¨¹ýparent.frames.lengthÈ·¶¨´°¿ÚÖд°ÌåµÄÊýÄ¿¡£ ³ýÁËʹÓÃÊý×éϱêÀ´·ÃÎÊ´°ÌåÍ⻹¿ÉÒÔʹÓÿò¼ÜÃûºÍ´°ÌåÃûÀ´ÊµÏÖ¸÷ÔªËصķãº
parent.framesName.decument.formNames.elementName.(m/p)
¡¡
Èý¡¢·¶Àý
¡¡¡¡ÏÂÃæÎÒÃÇͨ¹ýÒ»¸ö¾ßÌåµÄʵÀý,
À´ËµÃ÷ÀûÓÃJavaScript½Å±¾ÔÚWEBÖÐʵÏÖ¸üΪ¸´ÔÓµÄÐÅÏ¢½»»¥¡£¸ÃÀý×ÓÊÇÔÚÒ»¸ö¶à´°¿ÚÖÐʵÏÖ´°ÌåÐÅÏ¢µÄ¶¯Ì¬½»»¥,ÔÚ³ÌÐòÖÐÊ×Ï
Ïà¹ØÎĵµ£º
This tool will let you optimize your JavaScript (JScript) code by removing comments, whitespace as well as other unnecessary characters as well as by optionally shortening function / variable / class names.
http://www.xtreeme.com/javascript-optimizer/ ......
»Ø³µµã»÷°´Å¥
Ö»ÐèÔÚ.aspxÒ³Ãæ´úÂëÖмÓÈëÒ»¶ÎJavaScript¼´¿É£º
<script type="text/javascript" language="javascript">
document.onkeydown = Check;
function Check(){ &n ......
×î½ü£¬ÎҲο¼£¬¸ù¾ÝÕýÔò±í´ïʽ¹¹½¨DFA£¨È·¶¨µÄÓÐÇî×Ô¶¯»ú£©µÄ¼¼Êõ£¬Íê³ÉÁËÒ»¸ö´ÓÕýÔò±í´ïʽµ½JavaScriptµÄ·ÒëÆ÷¡£
·ÒëÆ÷ÊÇÕë¶ÔchromeºÍfirefoxÉè¼ÆµÄ£¬Ã»ÓÐÔÚÆäËûä¯ÀÀÆ÷ÖвâÊÔ¹ý¡£
Google CodeÉϵÄÔ´´úÂ룺http://code.google.com/p/nephotools/source/browse/#svn/trunk/regexpQuery
regexpQuery.jsÖж¨ÒåÁËregexpQue ......
JavaScriptÌṩ½Å±¾ÓïÑԵıà³ÌÓëC++·Ç³£ÏàËÆ£¬ËüÖ»ÊÇÈ¥µôÁË£ÃÓïÑÔÖÐÓйØÖ¸ÕëµÈÈÝÒײúÉúµÄ´í
Î󣬲¢ÌṩÁ˹¦ÄÜÇ¿´óµÄÀà¿â¡£¶ÔÓÚÒѾ¾ß±¸£Ã++»ò£ÃÓïÑÔµÄÈËÀ´Ëµ£¬Ñ§Ï°JavaScript½Å±¾ÓïÑÔÊÇÒ»¼þ·Ç³£ÇáËÉÓä¿ìµÄÊ¡£
Ò»¡¢JavaScript´úÂëµÄ¼ÓÈë
¡¡¡¡JavaScriptµÄ½Å±¾°üÀ¨ÔÚHTMLÖУ¬Ëü³ÉΪHTMLÎĵµµÄÒ»²¿·Ö¡£ÓëHTML±êʶÏà½áºÏ£¬ ......
JavaScriptÊÇ»ùÓÚ¶ÔÏóµÄ½Å±¾±à³ÌÓïÑÔ£¬ÄÇôËüµÄÊäÈëÊä³ö¾ÍÊÇͨ¹ý¶ÔÏóÀ´Íê³ÉµÄ¡£ÆäÖÐÓйØÊäÈë¿Éͨ
¹ý´°¿Ú£¨Window£©¶ÔÏóÀ´Íê³É£¬¶øÊä³ö¿Éͨ¹ýÎĵµ£¨document£©¶ÔÏóµÄ·½·¨À´ÊµÏÖ¡£
Ò»¡¢´°¿Ú¼°ÊäÈëÊä³ö
Çë
¿´ÏÂÃæÀý×Ó£º
<HTML>
<Head>
<script
languaga="JavaScript">
Var test=window. ......