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>
Ïà¹ØÎĵµ£º
Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs ......
The jLayout JavaScript library provides layout algorithms for laying out components. A component is an abstraction; it can be implemented in many ways, for example as items in a HTML5 Canvas drawing or as HTML elements. The jLayout library allows you to focus on drawing the individual components i ......
ÔÚjavascriptÖеÄstring¶ÔÏóûÓÐtrim·½·¨£¬ËùÒÔtrim¹¦ÄÜÐèÒª×Ô¼ºÊµÏÖ£º
´úÂëÈçÏ£º
Java´úÂë
﹤scriptlanguage=”javascript”﹥
/**
*ɾ³ý×óÓÒÁ½¶ËµÄ¿Õ¸ñ
*/
String.prototype.trim=function(){
&nbs ......
JavaScriptµÄä¯ÀÀÆ÷¶ÔÏóÏê½â
Ò»¡¢ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷ÓÃ
¶þ¡¢Îĵµ¶ÔÏó¹¦Äܼ°Æä×÷ÓÃ
Èý¡¢·¶Àý
ʹÓÃä¯ÀÀÆ÷µÄÄÚ²¿¶ÔÏóϵͳ, ¿ÉʵÏÖÓëHTMLÎĵµ½øÐн»»¥¡£ËüµÄ×÷ÓÃÊǽ«Ïà¹ØÔªËØ×éÖ¯°ü×°ÆðÀ´£¬Ìṩ¸ø³ÌÐòÉè¼ÆÈËԱʹÓ㬴Ӷø¼õÇá±à³ÌÈ˵ÄÀͶ¯£¬Ìá¸ßÉè¼ÆWebÒ³ÃæµÄÄÜÁ¦¡£
Ò»¡¢ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ ......