JavaScript»ù´¡Ó¦ÓÃ
JavaScript¾ÍÕâô»ØÊÂ1£º»ù´¡ÖªÊ¶
1 ´´½¨½Å±¾¿é
1: <script language=”JavaScript”>
2: JavaScript code goes here
3: </script>
2 Òþ²Ø½Å±¾´úÂë
1: <script language=”JavaScript”>
2: <!--
3: document.write(“Hello”);
4: // -->
5: </script>
ÔÚ²»Ö§³ÖJavaScriptµÄä¯ÀÀÆ÷Öн«²»Ö´ÐÐÏà¹Ø´úÂë
3 ä¯ÀÀÆ÷²»Ö§³ÖµÄʱºòÏÔʾ
1: <noscript>
2: Hello to the non-JavaScript browser.
3: </noscript>
4 Á´½ÓÍⲿ½Å±¾Îļþ
1: <script language=”JavaScript” src="/”filename.js"”></script>
5 ×¢Êͽű¾
1: // This is a comment
2: document.write(“Hello”); // This is a comment
3: /*
4: All of this
5: is a comment
6: */
6 Êä³öµ½ä¯ÀÀÆ÷
1: document.write(“<strong>Hello</strong>”);
7 ¶¨Òå±äÁ¿
1: var myVariable = “some value”;
8 ×Ö·û´®Ïà¼Ó
1: var myString = “String1” + “String2”;
9 ×Ö·û´®ËÑË÷
1: <script language=”JavaScript”>
2: <!--
3: var myVariable = “Hello there”;
4: var therePlace = myVariable.search(“there”);
5: document.write(therePlace);
6: // -->
7: </script>
10 ×Ö·û´®Ìæ»»
1: thisVar.replace(“Monday”,”Friday”);
11 ¸ñʽ»¯×Ö´®
1: <script language=”JavaScript”>
2: <!--
3: var myVariable = “Hello there”;
4: document.write(myVariable.big() + “<br>”);
5: document.write(myVariable.blink() + “<br>”);
6: document.write(myVariable.bold() + “<br>”);
7: document.write(myVariable.fixed() + “<br>”);
8: document.write(myVariable.fontcolor(“red”) + “<br>”);
9: document.write(myVariable.fontsize(“18pt”) + “<br>”);
10: document.write(myVariable.italics() + “<br>”);
11: document.write(myVariable.small() + “<br>”);
12: do
Ïà¹ØÎĵµ£º
·½·¨Ò»£ºÊ¹ÓÃFileUpLoad ¿Ø¼þ¶à¸öÖ±½ÓÉÏ´«¡£ÕâÑù×öµÄÎÊÌâ¾ÍÊÇÒªÇóÒ³ÃæÌá½»£¬´Ó¶øµ¼ÖÂһЩ²»Ó¦¸ÃˢеÄÄÚÈÝÔڴ˲Ù×÷¹ý³ÌÖÐÏûʧµô¡£µ«ÊÇÓÃScriptManger À´Åª È´ÓÖ²»ÄÜÉÏ´«ÁË ÔÒòºÜ¼òµ¥ FileUpLoad ¿Ø¼þÒªÇópost¡£ÓÉÓÚÕâ¸öÎÊÌâ ËùÒÔ¶àÊýÈ˶¼ºÜÉÙ²ÉÓÃÕâÖÖ·½·¨£¬²»µÃ²»ÁíѰËü·¨¡£ÏÂÃæµÄ·½·¨¶þ½â¾ö´ËÎÊÌâ¡£
·½·¨¶þ£ºÊ¹ÓÃHtml±êÇ ......
JavaScript Module Pattern
£¨
JavaScript
Module
ģʽ£©
À´Ô´£º
1.
http://yuiblog.com/blog/2007/06/12/module-pattern/
2.
http://yuiblog.com/blog/2006/06/01/global-domination/
È«¾Ö±äÁ¿ÊÇÓкܴóΣº¦µÄ¡£ÔÚ
YU ......
Javascriptº¯Êý°üº¬Ò»¸öαÊý×飨pseudo-array£©£¬¸ÃÊý×é°üº¬ËùÓд«Èë²ÎÊý£¬ÎÒÃDz»ÄÜÐÞ¸ÄËü£¬µ«¿ÉÒÔ·ÃÎÊÆäÖеijÉÔ±£¬¸ÃÊý×éÒ²¾ßÓÐlengthÊôÐÔ¡£
º¯ÊýÖØÔØÒÀÀµÓÚÅжϴ«Èë²ÎÊý¸öÊýºÍÀàÐ͵ÄÄÜÁ¦¡£
º¯ÊýÖØÔØµÄÀý×Ó£º
<html>
<head>
<mce:script type="text/javascript"><!--
function sendMessage(msg ......
JavaScriptÖеÄ5ÖÖʼþʹÓ÷½Ê½½â˵(ת)
Ϊ×é¼þÌṩʼþ´¦ÀíÈë¿Ú£¬¿ÉÒÔ¼«´óµÄÌá¸ß×é¼þµÄ·â±ÕÐÔ£¬Í¬Ê±ÓÖÄÜÈÃ×é¼þºÜºÃµÄºÍÍâ½çͨÐÅ¡£²¢ÇÒÕâÒ²ÊÇÎÒÃÇÒѾϰ¹ßʹÓõÄÒ»ÖÖ¿ª·¢Ä£Ê½£¬.NET¡¢DHTMLµÈ¶¼ÌṩÁËÒ»Ì×ÍêÕûµÄʼþ´¦ÀíÄ£ÐÍ¡£ÏÂÃæÊǹØÓÚʹÓÃDHTMLÖÐʼþµÄÒ»¸ö×ܽᡣ
DHTMLÌṩÁË3ÖÖʼþµÄÊ¹Ó ......
ͻȻ¼äÏëÈ¥ÏÂÊ×fire in the holeµÄÁåÉù£¬ÓÚÊÇÓÃsosoÕÒÁËһϣ¬½øÈëÁËÊÖ»úÀÖÔ° £¨http://download.shouji.com.cn/do/wave?html=&inputname=wave&wname=Fire+in+the+hole+&thsubmit=%E6%90%9C%E7%B4%A2£©£¬Ñ¡Ôñfire in the hole£¬µ¯³ö¸ö´°¿Ú£¬ÌáʾÈÃÊäÈëÊÖ»úºÅÂë¡£ÔÎËÀ£¬²»¾ÍÏÂÊ׸èÂ»¹²»ÈÃÖ±½ÓÏ¡£ºÇºÇ£¬·¢Ï ......