javascript ÕýÔò±í´ïʽ ÊýÖµÑéÖ¤
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ÑéÖ¤Êý×Ö×î¼òµ¥<a href="http://www.jb51.net/list/list_6_1.htm" target="_blank"><font
color="red">ÕýÔò</font></a>±í´ïʽ´óÈ« </title>
</head>
<body>
<h3>
ÊäÈëÍê°´»Ø³µºó¼´¿ÉÑéÖ¤£¡£¨×ÔÈÏΪ×î¼òµ¥£¡£©</h3>
ÕýÕûÊý:
<input type="text" size="20" onkeydown="if(event.keyCode == 13) alert(/^\d+$/.test(this.value));" />
<br>
¸ºÕûÊý:
<input type="text" size="20" onkeydown="if(event.keyCode == 13) alert(/^-\d+$/.test(this.value));" />
<br>
Õû Êý:
<input type="text" size="20" onkeydown="if(event.keyCode == 13) alert(/^-?\d+$/.test(this.value));" />
<br>
ÕýСÊý:
<input type="text" size="20" onkeydown="if(event.keyCode == 13) alert(/^\d+\.\d+$/.test(this.value));" />
<br>
¸ºÐ¡Êý:
<input type="text" size="20" onkeydown="if(event.keyCode == 13) alert(/^-\d+\.\d+$/.test(this.value));" />
<br>
С Êý:
<input type="text" size="20" onkeydown="if(event.keyCode == 13) alert(/^-?\d+\.\d+$/.test(this.value));" />
<br>
ʵ Êý:
<input type="text" size="20" onkeydown="if(event.keyCode == 13) alert(/^-?\d+\.?\d*$/.test(this.value));" />
<br>
±£Áô1λСÊý:<input type="text" size="20" onkeydown="if
Ïà¹ØÎĵµ£º
ÎÄÕÂÀ´×Ô£ºhttp://www.oschina.net/p/closure
Google¿ªÔ´ÁËÆäÄÚ²¿Ê¹ÓõÄJavaScript¿ª·¢¹¤¾ß£¬Ï£Íû°ïÖúÍⲿ³ÌÐòÔ±¿ª·¢³öËٶȸü¿ìµÄWebÓ¦ÓóÌÐò¡£GoogleÈÏΪͨ¹ýÔÊÐí¿ª·¢ÕßʹÓÃGoogle×Ô¼ºËùÓõŤ¾ß£¬ËûÃDz»½ö¿ÉÒÔ´´Ôì³ö¸ü¿ìµÄ¸»WebÓ¦ÓóÌÐò£¬¶øÇÒÄÜÕæÕýÈÃWeb²åÉϳá°ò¡£Closure JavaScript±àÒëÆ÷ºÍ¿âÔø±»GoogleÓÃÓÚ¿ª·¢Gmail ......
javascriptÖÐÓÐÒ»ÖÖ·½·¨½Ð×ö·º»¯·½·¨£¬Ö¸ÄÇÖÖÔÉú¶ÔÏ󲻿ɱéÀúµÄÔÐÍ·½·¨¡£ÈçArrayµÄpop£¬sliceµÈ¡£ÎÒÃDZØÐëÖªµÀËüÃǵÄÃû×Ö²ÅÄܵ÷ÓÃËü»òÕß°ÑËüÍÚ³öÀ´¡£¼ÙÈçÎÒÃÇÏëÉè¼ÆÒ»¸öÀ࣬ӵÓÐÓëStringͬÑùµÄ¹¦ÄÜ£¬ÎÒÃǾÍÓÐÕâÐèÒª¡£²»Èç·Å¿ªµã˵£¬ÎªÊ²Ã´ÒªÉè¼ÆÕâ¸öÀà°É£¬ÏÔÈ»String2µÄЧÂʲ»ÈçÔÉúµÄ£¬µ«ÊÂÇé×ÜÒªÍùÁ½Ãæ¿´¡£ÕýÈçC#²»Èç¶þ ......
//ÓÉÒ³ÃæÔªËØdate_string(YYYY-MM_DD¸ñʽ)µÃµ½Êý×édate_array
//ÊäÈë²ÎÊý£ºdate_string:ÈÕÆÚ´®£»marker:ÈÕÆÚ´®date_stringÀïµÄ·Ö¸ô·û£¬Èç¹ûûÓÐÔòΪ""£»
//·µ»ØÖµ£º Êý×飺date_array
// Êý×éÔªËØdate_array.year=YYYY£»dat ......
http://blog.csdn.net/cyai/archive/2009/05/25/4213956.aspx
JS×Ô´øº¯Êý
concat
½«Á½¸ö»ò¶à¸ö×Ö·ûµÄÎı¾×éºÏÆðÀ´£¬·µ»ØÒ»¸öеÄ×Ö·û´®¡£
var a = "hello";
var b = ",world";
var c = a.concat(b);
alert(c);
//c = "hello,world"
indexOf
·µ»Ø×Ö·û´®ÖÐÒ»¸ö×Ó´®µÚÒ»´¦³öÏÖµÄË÷Òý£¨´Ó×óµ½ÓÒËÑË÷£©¡£Èç¹ûÃ»Ó ......
Ò»¡¢Ç°ÑÔ
Ajax£¬Òì²½JavaScriptºÍXML£¬Ç°ÃæÒѾ½âÊ͹ý£¬ËùÒÔAjaxµÄѧϰ»¹°üº¬JavaScriptºÍXML£¬ÕâÀïÎÒÃÇÏÈ¿´JavaScript£¬¶øJavaScriptʵ¼ÊÉÏÓÖÊǰüº¬JavaScriptÓï·¨ºÍHTML DOM¼´Îĵµ¶ÔÏóÄ£Ð͵쬽ÓÏÂÀ´»á·Ö±ð½éÉÜ¡£
JavaScript½Ì³Ì²Î¿¼µØÖ·£ºhttp://www.w3school.com.cn/js/index.asp
¶þ¡¢JavaScript»ù´¡
1)&nb ......