JavascriptÖÐÎļþ·¾¶µÄÎÊÌâ - Web ¿ª·¢ / Ajax
Îʸö±È½Ï»ù´¡µÄÎÊÌ⣬ÔÚÒ»¸öhtmlÎļþÖÐÒýÈëÁËÒ»¸ö.jsµÄÎļþ£¬ÄÇô¶ÔÓÚÕâ¸ö .js µÄÎļþÀ´Ëµ£¬ËüËù¶ÔÓ¦µÄµ±Ç°Â·¾¶Ó¦¸ÃÊÇÄÄÒ»¸ö£¿ÊÇhtmlÎļþËùÔڵķ¾¶£¬»¹ÊÇ .js ÎļþµÄ·¾¶£¿£¨htmlÓëjs²»ÔÚͬһÎļþ¼ÐÖУ©
ÓÉÓÚjsÖÐÒýÓÃµÄÆäËû×ÊÔ´Îļþ×ÜÕÒ²»µ½£¬ËùÒÔÐéÐÄÇó½Ì
JSÎļþÖеÄ·¾¶£¬ÊÇHTMLµÄ¡£
×îºÃ±ðдÏà¶Ô·¾¶../../ÕâÑùµÄ¿´ÆðÀ´Ì«·Ñ¾¢¡£
¾Íд¾ø¶ÔµÄ/Îļþ¼Ð/Îļþ¼Ð/Îļþ
ÕâÑù¶àºÃ£¬´Ó×îÍâ²ã¿ªÊ¼ÍùÀïÃæÕÒ¡£
ÎÒÒ²ÍÆ¼öʹÓþø¶Ô·¾¶
CSS code:
£¨htmlÓëjs²»ÔÚͬһÎļþ¼ÐÖУ©
ÒòΪ²»ÔÚͬһ¸öÎļþ¼Ð£¬¿¼Âǵ½ÕâЩÎļþ¿ÉÄÜ»áÒ»ÆðÒÆ¶¯¡£
ËùÒÔ×îºÃʹÓÃÏà¶Ô·¾¶¡£
È磺<script type="text/javascript" src="demo/jslib/test.js"></script>
¾ÍÕâÑù¡£
¡£
Ïà¹ØÎÊ´ð£º
ÓÃjavascript½«Êý¾Ýµ¼³öµ½Îı¾Îļþ(txt)ÖÐ..
Ê×ÏȼÙÉèÒѾÓÐÁËÐèҪдÈëµÄÎı¾ÄÚÈÝ var txtContent ="ÐèҪдÈëµÄÄÚÈÝ";
ÏÖÔÚÐèÒªÓÃjavascript½«ÄÚÈÝдÈëtxtÎļþ(Õâ¸ötxtÎļþ²»´æÔÚ,ÐèÒª´´½¨)ÖÐ,È»ºóдºÃÖ ......
ÒÔÏÂÊÇÒ»¶ÎJavsScript½Å±¾£¬µ«ÔËÐÐʱ×Ü»á²úÉú ¡°Microsoft JScript ÔËÐÐʱ´íÎó: 'null' Ϊ¿Õ»ò²»ÊǶÔÏó¡±Òì³££¬´ó¼Ò°ï¿´Ò»Ï¡£
<form id="form1" runat="server">
< ......
Çë½Ì¸÷λ´óÏÀ¡£
ÎÒÓÐÒ»Ò³Ãæa1.asp ÐèÒª´òÓ¡¡£ºáÏò£¬ÉÏ30£¬×ó5£¬ÓÒ5£¬ÏÂ5£¬Ò³Ã¼¡¢Ò³½ÅΪ¿Õ¡£
µ±Óû§µ½´ïa1.aspÒ³Ãæ¾Í×Ô¶¯ÉèÖÃÉÏÊöÃèÊö¡£À뿪a1.asp¾Í»Ö¸´Ä¬ÈÏÉèÖá£
Çë½Ì´óÏÀÃÇÈçºÎ±àÂ롣лл
û¿´Ã÷°×£¬ËµµÃ¸üÃ÷ ......
ÎÒÏëÎÊÒ»ÏÂÈçºÎÔÚ»ðºüÖйرգ¬·Ç½Å±¾´ò¿ªµÄÒ³Ãæ£¬ºÃÏñwindow.close()²»¹ÜÓÃO(¡É_¡É)O~£¬
°Ù¶Èһϣ¬×Ô¼ºÊÔÊÔ
<script language="javascript" type="text/javascript">
& ......
ÎÒÓÃJavaScriptдÁ˸öÓû§×¢²á½çÃæ£¬ÎÒÏë°ÑÀïÃæµÄÐÅÏ¢Ìá½»¹ýÈ¥
Èç¹ûÊÇ×Öĸ»òÊý×Ö¾ÍûÎÊÌ⵫ÊÇÈç¹ûÊÇÖÐÎľͳöÎÊÌâÁË£¡£¡
ÕâÊÇΪʲô°¡£¿£¿
<%@ page contentType="text/html; charset=gb2312" langua ......