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

javascriptÐÞ¸ÄIMG±êÇ©µÄSRCʵÏÖÑéÖ¤Âë»ðºü²»Õý³£

javascriptÐÞ¸ÄIMG±êÇ©µÄSRCʵÏÖÑéÖ¤Âëʱ,IEÕý³££¬»ðºüºÍgoogle³ö×´¿ö
1.µ±µã»÷ijһ°´Å¥µÄʱºò£¬°ÑͼƬÓòÖеÄͼƬ¸Ä±äÒ»ÏÂ
    <img id="randimg" src="/servlet/CreateValidateNum" width="60" height="20" />
    <span style="cursor:hand" onclick="reflush();return false;">¿´²»Çå</span>
    <script>
        function reflush()
        {
            document.getElementById(randimg).src="/servlet/CreateValidateNum";
        }
    </script>
2.˵Ã÷
    ”servlet/CreateValidateNum“ÊÇJAVAдµÄservlet¡£¸ÃservletÊÇ´òÓ¡³öͼƬ
3.³öÏÖµÄÎÊÌâ
    ÔÚIE6ÏÂÃæͼƬÐÞ¸ÄÕý³££¬µ«ÔÚIE7ºÍFirefoxÏÂÃæÈ´²»Ë¢ÐÂ
4.Çé¿ö·ÖÎö
    Èç¹ûеÄͼƬ¸ú¾ÉµÄͼƬµØÖ·²»Ò»Ñù£¬Ð§¹ûÊÇ»á³öÀ´µÄ¡£¼´£ºÍ¼Æ¬Óз¢Éú¸Ä±ä¡£
    µ«Ïñ”ÑéÖ¤Âë“ÕâÖÖ¹¦ÄÜ¡£Ð¾ÉͼƬµÄµØÖ·ÊÇÒ»ÑùµÄ¡£
    ¼øÓÚÉÏÊöÇé¿ö£¬»³ÒÉÓпÉÄÜÊÇÒòΪͼƬµØÖ·ÊÇÒ»ÑùµÄ£¬¶øµ¼ÖÂä¯ÀÀÆ÷×Ô¶¯¶Á»º´æ¡£
5.½â¾ö·½·¨
    °Ñjavascript¸Ä³ÉÕâÑù¼´¿É£º
    document.getElementById(randimg).src="/servlet/CreateValidateNum?"+Math.random();
    ¼´£ºÃ¿´ÎµÄ·ÃÎʵØÖ·¶¼²»Ò»Ñù£¬ÒòΪÓмÓËæ»úÊý¡£ËùÒÔÎÊÌâ½â¾ö


Ïà¹ØÎĵµ£º

JavaScript ÓÃÓÚģʽƥÅäµÄ RegExp ·½·¨

±¾ÆªÈÕÖ¾ÏÈÖ÷ÒªÌÖÂÛ RegExp ¶ÔÏóµÄ²¿·Ö·½·¨£¬RegExp ¶ÔÏó¶¨ÒåÁËÁ½¸öÓÃÓÚģʽƥÅäµÄ·½·¨£¬ËüÃÇÊÇexec()
ºÍtest()
ÏÂÃæÎÒÃÇÖðÒ»½øÐн²½â
¡£ºÇ£¬ºÍÉÏƪÈÕÖ¾Ò»ÑùµÄ½éÉÜ£¬¿´À´Ì×»°£¬¹ûÈ»ÊÊÓÃÓÚ¶à¸ö³¡ºÏ¡£àÅ¡£
exec() ¼ìË÷×Ö·û´®ÖеÄÖ¸¶¨Öµ£¬·µ»ØÖµÊDZ»ÕÒµ½µÄÖµ£¬Èç¹ûûÓз¢ÏÖÆ¥Å䣬Ôò·µ»Ø null£º
Ö÷ÒªµÄRegExpģʽƥÅä·½·¨Ê ......

ÔÚPBÖÐʹÓÃJavaScript½Å±¾º¯Êý

ÔÚPBÖÐʹÓÃJavaScript½Å±¾º¯Êý
ÔÚPBÖÐʹÓÃJavaScript½Å±¾º¯Êý
ÏÖÔÚÐí¶àµÄÐÅϢϵͳ¶¼ÊÇ»ùÓÚB/S°æ±¾£¬µ«PBдµÄÐÅϢϵͳÉú´æ¿Õ¼äÒ²±È½Ï´ó£¬ÍùÍùÊÇÒ»¸öÐÅϢϵͳ¼´ÓÐPB°æ±¾Ò²ÓÐB/S°æ±¾¡£ÐÅϢϵͳ»áÓÐÐí¶àµÄÒµÎñ¹æÔò£¬B/SÖÐÒµÎñ¹æÔòµÄ¼ì²éÔÚJavaScript½Å±¾ÖÐʵÏÖ£¬Èç¹ûÔÚPBÖÐÓÖʵÏÖÒ»´Î£¬·Ñʱ·ÑÁ¦²»Ëµ£¬
ÒµÎñ¹æÔò¸Ä±äÓÖÒªÖØб ......

javascript ×Ü½á ¡¶Ò»¡·

1£ºÈ¡µÃ±íµ¥ÖеÄTextBox ÖеÄÊý¾Ý£ºdocument.FormName.TextBox.value;
2:  ¿ØÖÆÔªËصÄÏÖʵºÍÒþ²Ø£ºÓÐvisibility  ºÍ display
Çø±ð£º1£©Ç°ÕßµÄÊôÐÔÖµÓУ¬visible¡¢hidden ¡£
         ºóÕßµÄÊôÐÔÖµÓУºblock ºÍ none£»
      2£©Ç°ÕßËäÈ»Òþ ......

javascriptÅжϺº×ÖµÄËÄÖÖ·½·¨


×ֺţº´ó ÖРС
·½·¨Ò»£º×µÄ£¬×îÈÝÒ×Àí½âµÄ£¬ÇÒ¿ÉÒÔËæÒâÉèÖÃÒªÅųýµÄ×Ö·û
<script language="javascript">
function isChinese1(str){
var badChar ="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
badChar += "abcdefghijklmnopqrstuvwxyz";
badChar += "0123456789";
badChar += " "+"¡¡";//°ë½ÇÓëÈ«½Ç¿Õ¸ñ
badChar ......

javascriptÔÚ´«µÝurl£¨º¬ÓÐÖÐÎÄ£©Ê±³öÏÖÂÒÂë


´ó¼Ò¿ÉÄܶ¼Óöµ½¹ýÔÚдjavascirpt´úÂëʱ´«µÝÖÐÎÄ£¬ÔÚºǫ́ȡµ½Ê±·¢ÏÖÊÇÂÒÂ룬ÕâÀï°ÑÎÒ½ñÌì×öµÄ·½·¨Ð´³öÀ´£¬Ï£Íû¶Ô´ó¼ÒÒÔºóÓÐÓã¡
·½·¨£¨Ò»£©£º
htmlÒ³Ã棺
function testOne() {
   var url = "testOne_test.do?expr="+ÄãºÃ;
   location = encodeURI(url);
}
ºǫ́java´úÂ룺
String expr = ne ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ