javascriptËÙ¼ÇÊÖ²á
1.document.write("");
Ϊ
Êä³öÓï¾ä
2.JS
ÖеÄ×¢ÊÍΪ
//
3.
´«Í³µÄ
HTML
ÎĵµË³ÐòÊÇ
:document->html->(head,body)
4.
Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄ
DOM
˳ÐòÊÇ
:window->(navigator,screen,history,location,document)
5.
µÃµ½±íµ¥ÖÐÔªËØµÄÃû³ÆºÍÖµ
:document.getElementById("
±íµ¥ÖÐÔªËØµÄ
ID
ºÅ
").name(
»ò
value)
6.
Ò»¸öСдת´óдµÄ
JS: document.getElementById("output").value
= document.getElementById("input").value.toUpperCase();
7.JS
ÖеÄÖµÀàÐÍ
:String,Number,Boolean,Null,Object,Function
8.JS
ÖеÄ×Ö·ûÐÍת»»³ÉÊýÖµÐÍ
:parseInt(),parseFloat()
9.JS
ÖеÄÊý×Öת»»³É×Ö·ûÐÍ
:(""+
±äÁ¿
)
10.JS
ÖеÄÈ¡×Ö·û´®³¤¶ÈÊÇ
:(length)
11.JS
ÖеÄ×Ö·ûÓë×Ö·ûÏàÁ¬½ÓʹÓÃ
+
ºÅ
.
12.JS
ÖеıȽϲÙ×÷·ûÓÐ
:==
µÈÓÚ
,!=
²»µÈÓÚ
,>,>=,<.<=
13.JS
ÖÐÉùÃ÷±äÁ¿Ê¹ÓÃ
:var
À´½øÐÐÉùÃ÷
14.JS
ÖеÄÅжÏÓï¾ä½á¹¹
:if(condition){}else{}
15.JS
ÖеÄÑ»·½á¹¹
:for([initial
expression];[condition];[upadte expression]) {inside loop}
16.
Ñ»·ÖÐÖ¹µÄÃüÁîÊÇ
:break
17.JS
Öеĺ¯Êý¶¨Òå
:function
functionName([parameter],...){statement[s]}
18.
µ±ÎļþÖгöÏÖ¶à¸ö
form
±íµ¥Ê±
.
¿ÉÒÔÓÃ
document.forms[0],document.forms[1]
À´´úÌæ
.
19.
´°¿Ú
:
´ò¿ª´°¿Ú
window.open(),
¹Ø±ÕÒ»¸ö´°¿Ú
:window.close(),
´°¿Ú±¾Éí
:self
20.
״̬À¸µÄÉèÖÃ
:window.status="
×Ö·û
";
21.
µ¯³öÌáʾÐÅÏ¢
:window.alert("
×Ö·û
");
22.
µ¯³öÈ·ÈÏ¿ò
:window.confirm();
23.
µ¯³öÊäÈëÌáʾ¿ò
:window.prompt();
24.
Ö¸¶¨µ±Ç°ÏÔʾÁ´½ÓµÄλÖÃ
:window.location.href="URL"
25.
È¡³ö´°ÌåÖеÄËùÓÐ±íµ¥µÄÊýÁ¿
:document.forms.length
26.
¹Ø±ÕÎĵµµÄÊä³öÁ÷
:document.close();
27.
×Ö·û´®×·¼ÓÁ¬½Ó·û
:+=
28.
´´½¨Ò»¸öÎĵµÔªËØ
:document.createElement(),document.createTextNode()
29.
µÃµ½ÔªËصķ½·¨
:document.getElementById()
30.
ÉèÖÃ±íµ¥ÖÐËùÓÐÎı¾Ð͵ijÉÔ±µÄֵΪ¿Õ
:
var form = window.document.forms[0]
for (var i = 0; i<form.elements.length;i++){
if (form.elements[i].type ==
Ïà¹ØÎĵµ£º
javascriptÌṩÁËÐí¶àº¯Êý¹©¿ª·¢ÈËԱʹÓã¬ÏÂÃæ¸ø³öÒ»¸ö¼òµ¥½éÉÜ£¬¸üÏêϸµÄÐÅÏ¢Çë²Î¿¼Visual InterDevÌṩµÄÔÚÏß°ïÖú¡£
¡¡¡¡javascriptº¯ÊýÒ»¹²¿É·ÖΪÎåÀࣺ
¡¡¡¡·³£¹æº¯Êý
¡¡¡¡·Êý×麯Êý
¡¡¡¡·ÈÕÆÚº¯Êý
¡¡¡¡·Êýѧº¯Êý
¡¡¡¡·×Ö·û´®º¯Êý
¡¡¡¡1.³£¹æº¯Êý
¡¡¡¡javascript³ ......
click() ¶ÔÏó.click() ʹ¶ÔÏó±»µã»÷¡£
closed ¶ÔÏó.closed ¶ÔÏó´°¿ÚÊÇ·ñÒѹرÕtrue/false
clearTimeout(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetTimeout¶ÔÏó
clearInterval(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetInterval¶ÔÏó
confirm("ÌáʾÐÅÏ¢") µ¯³öÈ·ÈÏ¿ò£¬È·¶¨·µ»ØtrueÈ¡Ïû·µ»Øfalse
cursor:Ñùʽ ¸ü¸ÄÊó±êÑùʽ hand crosshair text wait help defa ......
//ÎÞģʽµÄÌáʾ¿ò
//ÆÁ±Î°´¼ü
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<noscript><meta http-equiv="refresh" content="0;url=about:noscript"></noscript>
<title>ÆÁ±ÎÊó±êÓ ......
//the common event,If your brower is firefox,you should use this function instead of "window.event"
function getEvent() {
if(document.all)
return window.event; //get ie event
func=getEvent.caller;
while(func!=null) {
......
function $id(s) {
return document.getElementById(s);
}
//ÅжÏСÊý
function IsFloat(s) {
if (!/^[+\-]?\d+(.\d+)?$/.test(s))
return false;
else
return ......