javascript ÕýÔò±í´ïʽ - Web ¿ª·¢ / JavaScript
˸ø¾ßÌå½âÊͽâÊÍ
ÔÙÀ´¼¸¸öÀý×Ó£¡~
221.<BR><SPAN style="FONT-SIZE: 18pt">ʾÀý</SPAN>
222.<BR>ÏÂÃæµÄʾÀý´´½¨Ò»¸ö°üº¬ÕýÔò±í´ïʽģʽ¼°Ïà¹Ø±êÖ¾µÄ¶ÔÏó(re)£¬ÏòÄúÑÝʾÕýÔò±í´ïʽ¶ÔÏóµÄÓ÷¨¡£ÔÚ±¾ÀýÖУ¬×÷Ϊ½á¹ûµÄÕýÔò±í´ïʽ¶ÔÏóÓÖÓÃÓÚ match ·½·¨ÖУº
223.<BR><PRE class=java name="code">function MatchDemo()
224.{
225.var r, re; // ÉùÃ÷±äÁ¿¡£
226.var s = "The rain in Spain falls mainly in the plain";
227.re = new RegExp("ain","g"); // ´´½¨ÕýÔò±í´ïʽ¶ÔÏó¡£
228.r = s.match(re); // ÔÚ×Ö·û´® s ÖвéÕÒÆ¥Åä¡£
229.return(r);
230.}
231.</PRE>
232.<BR>
233.<BR>·µ»ØÖµ£º ain,ain,ain,ain\\
234.<BR>ÊôÐÔ lastIndex ÊôÐÔ | source ÊôÐÔ\\
235.<BR>·½·¨ compile ·½·¨ | exec ·½·¨ | test ·½·¨\\
236.<BR>ÒªÇó °æ±¾ 3\\
237.<BR>Çë²ÎÔÄ RegExp ¶ÔÏó | ÕýÔò±í´ïʽÓï·¨ | String ¶ÔÏó\\
238.<BR>
239.<BR><SPAN style="FONT-SIZE: 18pt">exec ·½·¨</SPAN>
240.<BR>ÓÃÕýÔò±í´ïʽģʽÔÚ×Ö·û´®ÖÐÔËÐвéÕÒ£¬²¢·µ»Ø°üº¬¸Ã²éÕÒ½á¹ûµÄÒ»¸öÊý×é¡£
241.<BR>rgExp.exec(str)
242.<BR>
243.<BR>²ÎÊý
244.<BR>
245.<BR>rgE
Ïà¹ØÎÊ´ð£º
×î½ü ʹÓà js, ¾³£²»ÄÜÉÏÍø, Ï£ÍûÄÄλ´ïÈË ÄÜÌṩһ¸ö
±È½ÏÍêÕûµÄ jsÀëÏßÎĵµ,ÐÂÒ»µã¶ù,ÍêÕûµã¶ùµÄ±È½ÏºÃ,±ÈÈçÉæ¼° dom ÕâЩ
ÇëÖ¸µãÒ»¶þ.
Íò·Ö¸Ðл°¡.
http://download.csdn.net/source/566130
......
ÎÒÏëÎÊÒ»ÏÂÈçºÎÔÚ»ðºüÖйرգ¬·Ç½Å±¾´ò¿ªµÄÒ³Ã棬ºÃÏñwindow.close()²»¹ÜÓÃO(¡É_¡É)O~£¬
°Ù¶Èһϣ¬×Ô¼ºÊÔÊÔ
<script language="javascript" type="text/javascript">
& ......
ÎÒѧµÄÊÇC++,¶ÔÓÚJava²»ÊǺÜÁ˽⡣×î½ü¿´ÁËJava·½ÃæµÄÊ飬¶ÔÓÚһЩ¸ÅÄîÓÐÁ˳õ²½Á˽⣬ϣÍû´ó¼ÒºÍÎÒÁÄÁÄ£¬Ì¸Ì¸Java £¬JSP JavaScriptÕ⼸¸ö¸ÅÄî¡£
1. javascriptºÍCSS, HTMLÒ»Æ𽫻ᷢË͸øä¯ÀÀÆ÷½øÐÐÖ´ÐУ¬×îÖÕ½«Ò³Ã ......
JavaScript´úÂëÔõôʵÏÖ£¿
Çë´ó¼Ò¿´Çå³þÒªÇó[size=12px][/size]
Îļþ¼ÐÀïÃæºÜ¶àjpg¸ñʽµÄͼƬ£¬±ÈÈçÓÐÎå°ÙÕÅ ·ÅÔÚcÅ̵ÄÃû×Ö½Ð22µÄÎļþ¼ÐÀïÃæ ÔõôËæ»úÏÔʾһÕŠϣÍûÓгÌÐò
Ö»ÓÃJavaScript´úÂ룬²» ......
function test_(){
var wsh = new ActiveXObject("WScript.Shell");
wsh.run("d:\\1.bat",1);
}
1.batÄÚÈÝ:
@echo
pause
ÔÚ±ðÈË»ú×ÓÉÏÔËÐÐûÓÐÎÊÌâ,¿ÉÊǵ½ÎÒ»ú×ÓÉϾ ......