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+" </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("<table border=1px border-color=red>"); //¿ªÊ¼»±í¸ñ
for(m=1;m<=10;m++){
document.write("<tr>"); //¿ªÊ¼Ò»ÐÐ
for(n=1;n<=10;n++){
var r=(m-1)*10+n; //µ±Ç°µ¥Ôª¸ñµÄÊýÖµ
var q=true; //ĬÈÏΪÖÊÊý
if(r>3){for(p=2;p<r/2;p++) //ÅжÏÊÇ·ñΪÖÊÊý
if(r%p==0)q=false;} //Èôµ±Ç°ÊýÖµÄܱ»2——(r-1)Õû³ý£¬Ôò²»ÊÇÖÊÊý¡£
if(q){document.write("<td bgcolor='red' class='table2'>");} //ÈôΪÖÊÊý£¬ÓÃred±³¾°Ìî³ä
else {document.write("<td bgcolor='green' class='table2'>");}//Èô²»ÊÇÖÊÊý£¬ÓÃgreen±³¾°Ìî³ä
document.write(r); //Êä³öµ±Ç°Öµ
document.write("</td>"); //½áÊøµ±Ç°µ¥Ôª¸ñ
}
document.write("</tr>"); //½áÊøµ±Ç°ÐÐ
}
document.write("</table>"); //½áÊø±í¸ñ
// --></mce:script>
</body>
</html>
Ïà¹ØÎĵµ£º
µÚʮՠTools ¹¤¾ß
Having the right software is essential for identifying bottlenecks in both the loading and running of scripts. A number of browser vendors and large-scale websites have shared techniques and tools to help make the Web faster and more efficient. This ......
ÐÂÖÐ……
1¡¢Êý¾ÝÀàÐÍÑéÖ¤ÎÊÌâ
Asp.NetËäÈ»ÓÐÑéÖ¤¿Ø¼þ£¬µ«ÊÇÓÐЩ¸´ÔÓµÄÑéÖ¤»¹Êǵô«µ½·þÎñÆ÷ÉϽøÐУ¬ÓÃjsËٶȺÍÐÔÄܶ¼±È½ÏºÃ
<script>
//¼ì²éÊÇ·ñΪÈÎÒâÊý£¨ÊµÊý£©
function isNumeric(strNumber) {
var newPar=/^(-|\+)?\d+(\.\d+)?$/
alert(newPar.test(strNumber)); }
//¼ ......
JavaScriptÊÇ»ùÓÚ¶ÔÏóµÄ£¬ÈκÎÔªËض¼¿ÉÒÔ¿´³É¶ÔÏó¡£È»¶ø£¬ÀàÐͺͶÔÏóÊDz»Í¬µÄ¡£±¾ÎÄÖУ¬ÎÒÃdzýÁËÌÖÂÛÀàÐͺͶÔÏóµÄһЩÌصãÖ®Í⣬¸üÖØÒªµÄÊÇÑо¿ÈçºÎд³öºÃµÄ²¢ÇÒÀûÓÚÖØÓõÄÀàÐÍ¡£±Ï¾¹£¬JavaScriptÕâÖÖÁ÷ÐеĽű¾ÓïÑÔÈç¹ûÄܹ»½øÐÐÁ¼ºÃµÄ·â×°£¬²¢ÐγÉÒ»¸öÅÓ´óµÄÀàÐͿ⣬¶ÔÓÚÖØÓÃÊǷdz£ÓÐÒâÒåµÄ¡£
ÍøÉ϶ÔÓÚprototypeµÄÎÄÕ弆 ......
javascriptµÄStringÀàÄÚÖú¯Êýreplace(regexp, newString)º¯ÊýÌṩÁË×Ö·û´®Ìæ»»¹¦ÄÜ£¬´Óº¯ÊýÔÐÍÉÏ¿ÉÒÔ¿´³öÖ§³Ö Regular Exp¡£´Ëº¯Êý¹¦Äܷdz£ÊµÓ㬵«Ò²Óм¸¸öµØ·½Óеã»ìÏý£¬ÏÂÃæͨ¹ýʵ¼ÊµÄÀý×ÓÀ´ËµÃ÷£º
±ÈÈçÎÒÃÇÏÖÔÚÒªÕë¶Ô´®
var src="<a href="http://xx.com/a/2010 ......
¡ö´ò¿ª¡ö
<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) typ ......