Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScriptÖеÄÕýÔò±í´ïʽ

¾«Í¨ JSÕýÔò±í´ïʽ
ÕýÔò±í´ïʽ¿ÉÒÔ:
•²âÊÔ×Ö·û´®µÄij¸öģʽ¡£ÀýÈ磬¿ÉÒÔ¶ÔÒ»¸öÊäÈë×Ö·û´®½øÐвâÊÔ£¬¿´ÔÚ¸Ã×Ö·û´®ÊÇ·ñ´æÔÚÒ»¸öµç»°ºÅÂëģʽ»òÒ»¸öÐÅÓÿ¨ºÅÂëģʽ¡£Õâ³ÆΪÊý¾ÝÓÐЧÐÔÑéÖ¤
•Ìæ»»Îı¾¡£¿ÉÒÔÔÚÎĵµÖÐʹÓÃÒ»¸öÕýÔò±í´ïʽÀ´±êʶÌض¨ÎÄ×Ö£¬È»ºó¿ÉÒÔÈ«²¿½«Æäɾ³ý£¬»òÕßÌ滻Ϊ±ðµÄÎÄ×Ö
•¸ù¾ÝģʽƥÅä´Ó×Ö·û´®ÖÐÌáÈ¡Ò»¸ö×Ó×Ö·û´®¡£¿ÉÒÔÓÃÀ´ÔÚÎı¾»òÊäÈë×Ö¶ÎÖвéÕÒÌض¨ÎÄ×Ö
ÕýÔò±í´ïʽÓï·¨
Ò»¸öÕýÔò±í´ïʽ¾ÍÊÇÓÉÆÕͨ×Ö·û£¨ÀýÈç×Ö·û a µ½ z£©ÒÔ¼°ÌØÊâ×Ö·û£¨³ÆΪԪ×Ö·û£©×é³ÉµÄÎÄ×Öģʽ¡£¸ÃģʽÃèÊöÔÚ²éÕÒÎÄ×ÖÖ÷Ìåʱ´ýÆ¥ÅäµÄÒ»¸ö»ò¶à¸ö×Ö·û´®¡£ÕýÔò±í´ïʽ×÷Ϊһ¸öÄ£°å£¬½«Ä³¸ö×Ö·ûģʽÓëËùËÑË÷µÄ×Ö·û´®½øÐÐÆ¥Åä¡£
´´½¨ÕýÔò±í´ïʽ
var re = new RegExp();//RegExpÊÇÒ»¸ö¶ÔÏó,ºÍAarrayÒ»Ñù
//µ«ÕâÑùûÓÐÈκÎЧ¹û,ÐèÒª½«ÕýÔò±í´ïʽµÄÄÚÈÝ×÷Ϊ×Ö·û´®´«µÝ½øÈ¥
re =new RegExp("a");//×î¼òµ¥µÄÕýÔò±í´ïʽ,½«Æ¥Åä×Öĸa
re=new RegExp("a","i");//µÚ¶þ¸ö²ÎÊý,±íʾƥÅäʱ²»·Ö´óСд
RegExp¹¹Ô캯ÊýµÚÒ»¸ö²ÎÊýΪÕýÔò±í´ïʽµÄÎı¾ÄÚÈÝ,¶øµÚÒ»¸ö²ÎÊýÔòΪ¿ÉÑ¡Ïî±êÖ¾.±êÖ¾¿ÉÒÔ×éºÏʹÓÃ
•g £¨È«ÎIJéÕÒ£©
•i £¨ºöÂÔ´óСд£©
•m £¨¶àÐвéÕÒ£©
var re = new RegExp("a","gi");//Æ¥ÅäËùÓеÄa»òA
ÕýÔò±í´ïʽ»¹ÓÐÁíÒ»ÖÖÕýÔò±í´ïʽ×ÖÃæÁ¿µÄÉùÃ÷·½Ê½
var re = /a/gi;
ºÍÕýÔò±í´ïʽÏà¹ØµÄ·½·¨ºÍÊôÐÔ
ÕýÔò±í´ïʽ¶ÔÏóµÄ·½·¨
•test,·µ»ØÒ»¸ö Boolean Öµ£¬ËüÖ¸³öÔÚ±»²éÕÒµÄ×Ö·û´®ÖÐÊÇ·ñ´æÔÚģʽ¡£Èç¹û´æÔÚÔò·µ»Ø true£¬·ñÔò¾Í·µ»Ø false¡£
•exec,ÓÃÕýÔò±í´ïʽģʽÔÚ×Ö·û´®ÖÐÔËÐвéÕÒ£¬²¢·µ»Ø°ü<script type="text/javascript" src="http://www.javaeye.com/javascripts/tinymce/themes/advanced/langs/zh.js"></script><script type="text/javascript" src="http://www.javaeye.com/javascripts/tinymce/plugins/javaeye/langs/zh.js"></script>º¬¸Ã²éÕÒ½á¹ûµÄÒ»¸öÊý×é¡£
•compile,°ÑÕýÔò±í´ïʽ±àÒëΪÄÚ²¿¸ñʽ£¬´Ó¶øÖ´Ðеøü¿ì¡£
ÕýÔò±í´ïʽ¶ÔÏóµÄÊôÐÔ
•source,·µ»ØÕýÔò±í´ïʽģʽµÄÎı¾µÄ¸´±¾¡£Ö»¶Á¡£
•lastIndex,·µ»Ø×Ö·ûλÖã¬ËüÊDZ»²éÕÒ×Ö·û´®ÖÐÏÂÒ»´Î³É¹¦Æ¥ÅäµÄ¿ªÊ¼Î»Öá£
•$1...$9,·µ»Ø¾Å¸öÔÚģʽƥÅäÆÚ¼äÕÒµ½µÄ¡¢×î½ü±£´æµÄ²¿·Ö¡£Ö»¶Á¡£
•input ($_),·µ»ØÖ´Ðй淶±íÊö²éÕÒµÄ×Ö·û´®¡£Ö»¶Á¡£
•lastMatch (


Ïà¹ØÎĵµ£º

[ת]JavaScriptºÍJavaµÄÇø±ð

JavaScriptºÍJavaµÄÇø±ð
¡¡¡¡ËäÈ»JavaScriptÓëJavaÓнôÃܵÄÁªÏµ£¬µ«È´ÊÇÁ½¸ö¹«Ë¾¿ª·¢µÄ²»Í¬µÄÁ½¸ö²úÆ·¡£JavaÊÇSUN¹«Ë¾ÍƳöµÄÐÂÒ»´úÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ£¬ÌرðÊʺÏÓÚInternetÓ¦ÓóÌÐò¿ª·¢£»¶øJavaScriptÊÇNetscape¹«Ë¾µÄ²úÆ·£¬ÆäÄ¿µÄÊÇΪÁËÀ©Õ¹Netscape Navigator¹¦ÄÜ,¶ø¿ª·¢µÄÒ»ÖÖ¿ÉÒÔǶÈëWebÒ³ÃæÖеĻùÓÚ¶ÔÏóºÍʼþÇý¶ ......

JavaScript³£ÓöÔÏóµÄ·½·¨ºÍÊôÐÔ£¨ÍµÀ´µÄ£©

JavaScriptÊÇ»ùÓÚ¶ÔÏóµÄÓïÑÔ¡£ÎÒÃÇÖªµÀ£¬¶ÔÏóÊÇÓÉÒ»×éÊý¾Ý(JavaScriptÖгÆ֮ΪÊôÐÔ)ºÍÊ©¼ÓÔÚÕâ×éÊý¾ÝÉϵķ½·¨×é³ÉµÄ¡£Í¬Ê±£¬JavaScriptÖл¹ÓÐһЩ²»ÊôÓÚÈκζÔÏóµÄϵͳº¯Êý¡£±¾ÎĽ«¼òµ¥½éÉÜJavaScriptÖÐһЩ³£ÓöÔÏóµÄÊôÐԺͷ½·¨£¬ÒÔ¼°¼¸¸öÓÐÓõÄϵͳº¯Êý¡£
¡¡¡¡Ò»¡¢´®·½·¨
¡¡¡¡JavaScriptÓÐÇ¿´óµÄ´®´¦Àí¹¦ÄÜ£¬ÓÐÁËÕâЩ´® ......

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ

1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="return f ......

javascriptÔÚieÓëffÖеÄÇø±ð

JavascriptÖеij£¼ûÎÊÌâ

1. ¼¯ºÏÀà¶ÔÏóÎÊÌâ

ÏÖÓдúÂëÖÐÐí¶à¼¯ºÏÀà¶ÔÏóÈ¡ÓÃʱʹÓà ()£¬IE ÄܽÓÊÜ£¬Firefox ²»ÄÜ¡£
½â¾ö·½·¨£º¸ÄÓà [] ×÷ΪϱêÔËËã¡£È磺document.forms("formName") ¸ÄΪ
Js´úÂë
document.forms[
"formName"
];   
//ÓÖÈ磺
  
document.getEle ......

ÕÅТÏêjavascript½²×ù±Ê¼Ç



 
ÕÅТÏêjavascript½²×ù±Ê¼ÇÒ»
ÊÕ²Ø



< type="text/javascript">
document.body.oncopy = function() {
if (window.clipboardData) {
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ