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
Ïà¹ØÎĵµ£º
.×Ö·û´®(String)
1.ÉùÃ÷
var myString = new String("Every good boy does fine.");
var myString = "Every good boy does fine.";
2.×Ö·û´®Á¬½Ó
var myString = "Every " + "goo ......
//ÓÉÒ³ÃæÔªËØ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
·µ»Ø×Ö·û´®ÖÐÒ»¸ö×Ó´®µÚÒ»´¦³öÏÖµÄË÷Òý£¨´Ó×óµ½ÓÒËÑË÷£©¡£Èç¹ûÃ»Ó ......
Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â ÊÕ²Ø
JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ£¬Èç½ñ JavaScript ¿âÔ½À´Ô½Ç¿´ó£¬¿ÉÒÔʤÈÎÐí¶à¸´ÔӵŤ×÷£¬È»¶øÍ¬Ê±£¬ÈËÃÇÔÚÖÚ¶à JavaScript ¿âÃæÇ°ÓÖ¾õµÃÎÞËùÊÊ´Ó£¬±¾ÎÄ£¬ÎÒÃǽ«Ê¹Óà G ......
Ò»¡¢Ç°ÑÔ
Ajax£¬Òì²½JavaScriptºÍXML£¬Ç°ÃæÒѾ½âÊ͹ý£¬ËùÒÔAjaxµÄѧϰ»¹°üº¬JavaScriptºÍXML£¬ÕâÀïÎÒÃÇÏÈ¿´JavaScript£¬¶øJavaScriptʵ¼ÊÉÏÓÖÊǰüº¬JavaScriptÓï·¨ºÍHTML DOM¼´Îĵµ¶ÔÏóÄ£Ð͵쬽ÓÏÂÀ´»á·Ö±ð½éÉÜ¡£
JavaScript½Ì³Ì²Î¿¼µØÖ·£ºhttp://www.w3school.com.cn/js/index.asp
¶þ¡¢JavaScript»ù´¡
1)&nb ......