Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ :

href=¡°#¡±Óëhref=¡°javascript:void(0)¡±Çø±ð

ʹÓùýajaxµÄ¶¼³£¼ûÕâÑùµÄ´úÂ룺
<a href="javascript:doTest2();void(0);" mce_href="javascript:doTest2();void(0);">here</a>
µ«Õâ¶ùµÄvoid(0)¾¿¾¹ÊǺκ¬ÒåÄØ£¿
JavascriptÖÐvoidÊÇÒ»¸ö²Ù×÷·û£¬¸Ã²Ù×÷·ûÖ¸¶¨Òª¼ÆËãÒ»¸ö±í´ïʽµ«ÊDz»·µ»ØÖµ¡£
void ²Ù×÷·ûÓ÷¨¸ñʽÈçÏ£º
1. javascript:void (expression)
2. javascript:void expression
expression ÊÇÒ»¸öÒª¼ÆËãµÄ Javascript ±ê×¼µÄ±í´ïʽ¡£±í´ïʽÍâ²àµÄÔ²À¨ºÅÊÇÑ¡µÄ£¬µ«ÊÇдÉÏÈ¥ÊÇÒ»¸öºÃÏ°¹ß¡£ (ʵÏÖ°æ±¾ Navigator 3.0 )
ÄãÒÔʹÓà void ²Ù×÷·ûÖ¸¶¨³¬¼¶Á´½Ó¡£±í´ïʽ»á±»¼ÆË㵫ÊDz»»áµ±Ç°Îĵµ´¦×°ÈëÈκÎÄÚÈÝ¡£
ÏÂÃæµÄ´úÂë´´½¨ÁËÒ»¸ö³¬¼¶Á´½Ó£¬µ±Óû§ÒԺ󲻻ᷢÉúÈκÎÊ¡£µ±Óû§Á´½Óʱ£¬void(0) ¼ÆËãΪ 0£¬µ« Javascript ÉÏûÓÐÈκÎЧ¹û¡£
<A HREF="javascript:void(0)" mce_HREF="javascript:void(0)">µ¥´Ë´¦Ê²Ã´Ò²²»»á·¢Éú</A>
ÏÂÃæµÄ´úÂë´´½¨ÁËÒ»¸ö³¬¼¶Á´½Ó£¬Óû§µ¥Ê±»áÌá½»±íµ¥¡£
<A HREF="javascript:void(document.form.submit())" mce_HREF="javascript:void(document.form.submit())">
µ ......

javaScript»ñÈ¡¶ÔÏ󼯺ϣ¨ÁíÒ»ÖÖ·½·¨£©

³ýÁËÓÃgetElementByTagName   µÄÁíÒ»ÖÖ»ñÈ¡¶ÔÏ󼯺ϵķ½·¨
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
<form id="one" name="one">
<input type="text" title="sadf" sd="sdf" name="hello" id="hello" value="1" />
<input type="text" name="hello" sd="sasdfasdf" id="hello" value="2" />
<input type="text" name="hello" id="hello" value="3" />
<input type="text" name="hello" id="hello" value="4" />
<input type="text" name="hello" id="hello" value="5" />
<input type="text" name="hello" id="hello" value="6" />
<input type="text" name="hello" id="hello" value="7" />
<input type="text" name="hello" id="hello" value="8" /& ......

JavaScript¾­µäÓï¾ä¼°Æä»ù±¾Ó¦ÓÃ

¡ö´ò¿ª¡ö
<input name=Button onClick=document.all.WebBrowser.ExecWB(1,1) type=button value=´ò¿ª>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
¡öÁí´æΪ¡ö
<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) type=button value=Áí´æΪ><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
¡öÊôÐÔ¡ö
<input name=Button onClick=document.all.WebBrowser.ExecWB(10,1) type=button value=ÊôÐÔ><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
¡ö´òÓ¡¡ö
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=´òÓ¡><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
¡öÒ³ÃæÉèÖáö
<input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=Ò³ÃæÉèÖÃ><OBJECT clas ......

107Ìõ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.µ±ÎļþÖгöÏÖ¶à¸öfor ......

JavaScriptµÄä¯ÀÀÆ÷¶ÔÏóÏê½â

JavaScriptµÄä¯ÀÀÆ÷¶ÔÏóÏê½â  
Ò»¡¢ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷ÓÃ
¶þ¡¢Îĵµ¶ÔÏó¹¦Äܼ°Æä×÷Óà
Èý¡¢·¶Àý 
ʹÓÃä¯ÀÀÆ÷µÄÄÚ²¿¶ÔÏóϵͳ, ¿ÉʵÏÖÓëHTMLÎĵµ½øÐн»»¥¡£ËüµÄ×÷ÓÃÊǽ«Ïà¹ØÔªËØ×éÖ¯°ü×°ÆðÀ´£¬Ìṩ¸ø³ÌÐòÉè¼ÆÈËԱʹÓ㬴Ӷø¼õÇá±à³ÌÈ˵ÄÀͶ¯£¬Ìá¸ßÉè¼ÆWebÒ³ÃæµÄÄÜÁ¦¡£
Ò»¡¢ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷Óà                               
³ýÁËÇ°ÃæÌáµ½¹ýµÄÎĵµdocument¶ÔÏóÍ⣬Navigatorä¯ÀÀÆ÷Öл¹ÌṩÁË´°¿Ú£¨Window£©¶ÔÏóÒÔ¼°ÀúÊ·£¨History£©ºÍλÖã¨Location£©¶ÔÏó¡£
¡ñä¯ÀÀÆ÷¶ÔÏó(Navigator)ÌṩÓйØä¯ÀÀÆ÷µÄÐÅÏ¢
navigatorÖÐÓÐÓõÄÊôÐÔ°üÀ¨£º
¡ùappName:Ìṩ×Ö·û´®ÐÎʽµÄä¯ÀÀÆ÷Ãû³Æ¡£
¡ùappVersion:·´Ó³ä¯ÀÀÆ÷µÄ°æ±¾ºÅ¡£
¡ùappCodeName:ä¯ÀÀÆ÷µÄ´úÂëÃû³Æ¡£
¡ùuserAgent:Óû§´úÀí±êʶ¡£
¡ùmineTypes:¿ÉÒÔʹÓõÄmineÀàÐÍÐÅÏ¢¡£
¡ùplugins:¿ÉÒÔʹÓõIJå¼þÐÅÏ¢¡£
¡ùlanguages:ÓïÑÔÉ趨¡£
¡ùplatform:ä¯ÀÀÆ÷ÊÊÓõÄƽ̨Ãû³Æ¡£
ʾÀý£ºÄãËùʹÓõÄä¯ÀÀÆ÷Ϊ£ºMicrosoft ......

JavascriptÁ·Ï°ÊµÀý01:³Ë·¨¿Ú¾÷±íÓëɸѡËØÊý

<html>
<body>
<mce:script type="text/javascript"><!--
document.write("<table border=1px>");
for(i=1;i<=9;i++)
{document.write("<tr>");
for (j=1;j<=i;j++)
{document.write("<td class='table1'>"+i+"*"+j+"="+i*j+"&nbsp;&nbsp;</td>");
}
document.write("</tr>");
}
document.write("</table>"); //½áÊø³Ë·¨±í
document.write("<p>"); //»»ÐÐ
//¿ªÊ¼»­10*10·½Õó
document.write("<table border=1px border-color=red>"); //¿ªÊ¼»­±í¸ñ
for(m=1;m<=10;m++){
document.write("<tr>");
for(n=1;n<=10;n++){
document.write("<td class='table2' bgcolor='green'>");
document.write((m-1)*10+n);
document.write("</td>");
}
document.write("</tr>");
}
document.write("</table>");
document.write("<p></p>");
//»­³ö10*10·½Õ󣬲¢É¸Ñ¡³öËØÊý£¬ÓÃÂÌÉ«±ê¼Ç
document.write ......
×ܼǼÊý:40319; ×ÜÒ³Êý:6720; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [5] [6] [7] [8] 9 [10] [11] [12] [13] [14]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ