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

JavaScriptÕýÔò±í´ïʽ

//УÑéÊÇ·ñÈ«ÓÉÊý×Ö×é³É 
function isDigit(s) 

var patrn=/^[0-9]{1,20}$/; 
if (!patrn.exec(s)) return false 
return true 

//УÑéµÇ¼Ãû£ºÖ»ÄÜÊäÈë5-20¸öÒÔ×Öĸ¿ªÍ·¡¢¿É´øÊý×Ö¡¢“_”¡¢“.”µÄ×Ö´® 
function isRegisterUserName(s)
{
var patrn=/^[a-zA-Z]{1}([a-zA-Z0-9]|[._]){4,19}$/;
if (!patrn.exec(s)) return false
return true
}
 
//УÑéÓû§ÐÕÃû£ºÖ»ÄÜÊäÈë1-30¸öÒÔ×Öĸ¿ªÍ·µÄ×Ö´® 
function isTrueName(s)
{
var patrn=/^[a-zA-Z]{1,30}$/;
if (!patrn.exec(s)) return false
return true
}
}}
//УÑéÃÜÂ룺ֻÄÜÊäÈë6-20¸ö×Öĸ¡¢Êý×Ö¡¢Ï»®Ïß
<pre name="code" class="java">function isPasswd(s)
{
var patrn=/^(\w){6,20}$/;
if (!patrn.exec(s)) return false
return true
}
</pre>
<br>
<br>//УÑéÆÕͨµç»°¡¢´«ÕæºÅÂ룺¿ÉÒÔ“+”¿ªÍ·£¬³ýÊý×ÖÍ⣬¿Éº¬ÓГ-”
<br><pre name="code" class="java">function isTel(s)
{
//var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?(\d){1,12})+$/;
var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
if (!patrn.exec(s)) return false
return true
}
</pre>
<br>
<br>//УÑéÊÖ»úºÅÂ룺±ØÐëÒÔÊý×Ö¿ªÍ·£¬³ýÊý×ÖÍ⣬¿Éº¬ÓГ-”
<br><pre name="code" class="java">function isMobil(s)
{
var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
if (!patrn.exec(s)) return false
return true
}
</pre>
<br>
<br>//УÑéÓÊÕþ±àÂë
<br><pre name="code" class="java">function isPostalCode(s)
{
//var patrn=/^[a-zA-Z0-9]{3,12}$/;
var patrn=/^[a-zA-Z0-9 ]{3,12}$/;
if (!patrn.exec(s)) return false
return true
}
</pre>
<br>
<br>//УÑéËÑË÷¹Ø¼ü×Ö
<br><pre name="code" class="java">function isSearch(s)
{
var patrn=/^[^`~!@#$%^&*()+=|\\\][\]\{\}:;'\,.<>/?]{1}[^`~!@$%^&()+=|\\\]
[\]\{\}:;'\,.<>?]{0,19}$/;
if (!patrn.exec(s)) return false
return true
}
function isIP(s) //by zergling
{
var patrn=/^[0


Ïà¹ØÎĵµ£º

JavaScript³ÌÐò¹¹³É [3]

JavaScript½Å±¾ÓïÑԵĻù±¾¹¹³ÉÊÇÓÉ¿ØÖÆÓï¾ä¡¢º¯Êý¡¢¶ÔÏó¡¢·½·¨¡¢ÊôÐÔµÈ,À´ÊµÏÖ±à³ÌµÄ¡£
Ò»¡¢
³ÌÐò¿ØÖÆÁ÷
¡¡¡¡ÔÚÈκÎÒ»ÖÖÓïÑÔÖУ¬³ÌÐò¿ØÖÆÁ÷ÊDZØÐëµÄ£¬ËüÄÜʹµÃÕû¸ö³ÌÐò¼õС»ìÂÒ£¬Ê¹Ö®Ë³Àû°´ÆäÒ»¶¨µÄ·½Ê½Ö´ÐС£ÏÂÃæÊÇ
JavaScript³£ÓõijÌÐò¿ØÖÆÁ÷½á¹¹¼°Óï¾ä:
£±¡¢ifÌõ¼þÓï¾ä
¡¡»ù±¾
¸ñʽ
if£¨±íÊöʽ£©
Óï¾ä¶Î£±£»
......

ÓÃJavaScriptʵÏÖ¸ü¸´ÔӵĽ»»¥ [9]

Ò»¡¢Ê²Ã´ÊÇ¿ò¼Ü
¡¡¡¡¿ò¼ÜFrames×îÖ÷Òª¹¦ÓÃÊÇ"·Ö¸î"ÊÓ´°£¬Ê¹Ã¿¸ö"СÊÓ´°"ÄÜ
ÏÔʾ²»Í¬µÄHTM
LÎļþ£¬²»Í¬¿ò¼ÜÖ®¼ä¿ÉÒÔ»¥¶¯(interact)£¬Õâ¾ÍÊÇ˵²»Í¬¿ò¼ÜÖ®¼ä¿ÉÒÔ½»»»Ñ¶Ï¢Óë×ÊÁÏ¡£ÀýÈç:¼ÙÉèÄú¿ªÁËÁ½¸öframes£¬µÚÒ»¸öframe¿ÉÏÔ
ʾÊéµÄĿ¼£¬µÚ¶þ¸öframeÔòÏÔʾÕ½ڵľßÌåÄÚÈÝ¡£
¡¡¡¡¿ò¼Ü¿ÉÒÔ½«ÆÁÄ»·Ö¸î ......

ѧϰjavascriptÍƼöÍøÕ¾

/***************************by
garcon1986********************************/
 
Java is to
JavaScript what Car is to Carpet
ÂÛ̳½»Á÷£º´óÐ͵Äweb¿ª·¢ÉçÇø
http://www.webdeveloper.com/forum/index.php
W3CschoolsÖÐÎÄÕ¾£º¿ª·¢ÕßµÄʵÓÃ+ѧϰÍøÕ¾
http://www.w3school.com.cn/js/index.asp
javascript³ ......

javascript ¼¼ÇÉ

//×Ô´øµÄ´òÓ¡Ô¤ÀÀ WebBrowser.ExecWB(1,1) ´ò¿ª  
Web.ExecWB(2,1) ¹Ø±ÕÏÖÔÚËùÓеÄIE´°¿Ú£¬²¢´ò¿ªÒ»¸öд°¿Ú  
Web.ExecWB(4,1) ±£´æÍøÒ³  
Web.ExecWB(6,1) ´òÓ¡  
Web.ExecWB(7,1) ´òÓ¡Ô¤ÀÀ  
Web.ExecWB(8,1) ´òÓ¡Ò³ÃæÉèÖà 
Web.ExecWB(10,1) ²é¿´Ò ......

ÓÐ¹Ø JavaScript µÄ 10 ¼þÈÃÈ˷ѽâµÄÊÂÇé

JavaScript ¿ÉËãÊÇÊÀ½çÉÏ×îÁ÷Ðеıà³ÌÓïÑÔ£¬ËüÔø±» Web ¿ª·¢Éè¼ÆʦÌùÉÏجÃεıêÇ©£¬ËäÈ»ÕæÕýµÄجÃÎÆäʵÊÇ DOM
API£¬Õâ¸ö±»´óÁ¿µÄ¿ª·¢ÓëÉè¼ÆʦËæÊÖÄéÀ´ÔöÇ¿ËûÃÇµÄ Web Ç°¶ËµÄ½Å±¾ÓïÑÔ£¬Èç½ñÔ½À´Ô½±»ÖØÊÓ£¬ËäÔòÈç´Ë£¬JavaScript
ÈÔȻӵÓкܶàÈÃÈ˷ѽâµÄ¶«Î÷¡£
1. ËüÒÔ Java ÃüÃû£¬µ«²¢²»ÊÇ Java
Ëü×î³õ½Ð Mocha£¬ ½Óן ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ