100¶à¸ö³£ÓÃ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ÖеÄÊý×Öת»»³É×Ö·ûÐÍ:(""+±äÁ¿) var a=2;var b=""+a;
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
"fullscreen=no,channelmode=no,toolbar=no,location=no,menubar=no,scrollbas=no,resizable=no,"
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.type == "text"){
form.elements.value = "";
}
}
31.¸´Ñ¡°´Å¥ÔÚJSÖÐÅжÏÊÇ·ñÑ¡ÖÐ:document.forms[0].checkThis.checked (checkedÊôÐÔ´ú±íΪÊÇ·ñÑ¡Öзµ»ØTRUE»òFALSE)
32.µ¥Ñ¡°´Å¥×é(µ¥Ñ
Ïà¹ØÎĵµ£º
JavascriptË¢ÐÂÒ³ÃæµÄ¼¸ÖÖ·½·¨£º
³ÌÐò´úÂë
1 history.go(0)
2 location.reload()
3 location=location
4 location.assign(location)
5 document.execCommand('Refres ......
ת×Ôhttp://topic.csdn.net/u/20091014/12/44b0ac69-5228-429b-854a-a91e3736f1d4.html?64368
ÿһÏÊÇJSÖеÄС¼¼ÇÉ£¬µ«Ê®·ÖµÄʵÓã¡
1.document.write(”"); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document->html->(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window->(navig ......
12¿îJavaScript±í¸ñ¿Ø¼þ¡£±í¸ñ¿Ø¼þ(DataGrid )ÔÊÐí×îÖÕÓû§ÔĶÁºÍдÈëµ½¾ø´ó¶àÊýÊý¾Ý¿âµÄÓ¦ÓóÌÐò¡£DataGrid ¿Ø¼þ¿ÉÒÔÔÚÉè¼Æʱ¿ìËÙ½øÐÐÅäÖã¬Ö»ÐèÉÙÁ¿´úÂë»òÎÞÐè´úÂë¡£µ±ÔÚÉè¼ÆʱÉèÖÃÁËDataGrid ¿Ø¼þµÄ DataSource ÊôÐԺ󣬾ͻáÓÃÊý¾ÝÔ´µÄ¼Ç¼¼¯À´×Ô¶¯Ìî³ä¸Ã¿Ø¼þ£¬ÒÔ¼°×Ô¶¯ÉèÖøÿؼþµÄÁбêÍ·¡£È»ºóÄú¾Í ......
//µÚÒ»ÖÖ¹¹Ôì·½·¨: new Object()
var a = new Object();
a.x = 1, a.y = 2;
//µÚ¶þÖÖ¹¹Ôì·½·¨: ¶ÔÏóÖ±½ÓÁ¿
var b = {x:1,y:b};
//µÚÈýÖÖ¹¹Ôì·½·¨: ¶¨ÒåÀàÐÍ
function Point(x,y)
{
......
optionsÊý×é
¡¡¡¡¸ÃÊý×éÊÇselect¶ÔÏóµÄÒ»¸öÊôÐÔ,¼´Ñ¡Ôñ¿òÖеÄËùÓÐÑ¡Ïî(<OPTION>)µÄÒ»¸öÁÐ±í¡£
¡¡¡¡ÊôÐÔ
¡¡¡¡defaultSelected Ñ¡ÏîÁбíÖеÄȱʡѡÏî
¡¡¡¡index Ñ¡ÏîÁбíÖÐijѡÏîµÄË÷ÒýλÖÃ
¡¡¡¡length Ñ¡ÏîÁбíÖеÄÑ¡ÏîÊý(<OPTIONS>)
¡¡¡¡name Ñ¡ÏîÁбíµÄÃû×Ö(NAMEÌØÐÔ)
¡¡¡¡selected ±íÊ¾Ñ ......