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
Ïà¹ØÎÊ´ð£º
ÎÒÏëÎÊÒ»ÏÂÈçºÎÓÃjavascript¶¯Ì¬ÊµÏÖÏñÎÒÃÇÕâ¸öÍøÕ¾×ó±ßµÄĿ¼£¬Ð»À²£¡
??
ºÇºÇ£¡Ð»Ð»°¡£¡
¶¥Ò»ÏÂ
ÄãÃÇÊÇÊ²Ã´ÍøÕ¾°¡£¬ÒªÊǺǫ́ÊÇjavaÖ±½Ójsp£¬Èç¹ûºǫ́ÊÇc£¬ÄǾÍÓÃcgiÉú³Éxml£¬js¶¯Ì¬È¥¶ÁxmlµÄÊý¾Ý
Ó ......
ÎÒÒ²À´Ò»¸öȤζjavascript:
´ò¿ªÒÔÏÂhtmlÎļþ,ÒÀ´Î°´ÏÂG,L,CÈý¸ö¼ü,¾Í»áÓÐÆæ¼£³öÏÖ!!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" ......
<%
function getName(num)
......
end function
%>
<script>
var num=1;
var xx=<%=getName(num)%>
</script>
ÈçºÎ²ÅÄÜÔÚjava ......
ÔÚ¿Í»§¶ËÖªµÀÎļþ·¾¶£¬ÎÒÏë²»ÓÃfileUpload¿Ø¼þ°ÑÕâ¸öÎļþ´«µ½·þÎñÆ÷£¬Ò²¿ÉÒÔÓÃfileupload¿Ø¼þµ«ÊÇÕâ¸ö¿Ø¼þ±ØÐëÒþ²Ø£¨¾ÍÊDz»ÓÃÕâ¸ö¿Ø¼þÀ´Ñ¡Ôñ·¾¶£©
ÇëÎÊÄܲ»ÄÜʵÏÖ£¡£¡£¡
ûÓÐÈË×ö¹ýÂ𣡣¡£¡£¡£¡
ÄDz»¾ÍÊÇľÂí ......
function test_(){
var wsh = new ActiveXObject("WScript.Shell");
wsh.run("d:\\1.bat",1);
}
1.batÄÚÈÝ:
@echo
pause
ÔÚ±ðÈË»ú×ÓÉÏÔËÐÐûÓÐÎÊÌâ,¿ÉÊǵ½ÎÒ»ú×ÓÉϾ ......