Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScript·½·¨ºÍ¼¼ÇÉ´óÈ«


JavaScript·½·¨ºÍ¼¼ÇÉ´óÈ«  »ù´¡ÖªÊ¶
1 ´´½¨½Å±¾¿é  <script language=”JavaScript”> JavaScript code goes here </script>
2 Òþ²Ø½Å±¾´úÂë  <script language=”JavaScript”><!-- document.write(“Hello”); --> </script>
ÔÚ²»Ö§³ÖJavaScriptµÄä¯ÀÀÆ÷Öн«²»Ö´ÐÐÏà¹Ø´úÂë
3 ä¯ÀÀÆ÷²»Ö§³ÖµÄʱºòÏÔʾ  <noscript> Hello to the non-JavaScript browser.</noscript>
4 Á´½ÓÍⲿ½Å±¾Îļþ<script language=”JavaScript” src="/”filename.js"”></script>
5 ×¢Êͽű¾   // This is a comment  
document.write(“Hello”); // This is a comment
/*   All of this  is a comment  */
6 Êä³öµ½ä¯ÀÀÆ÷  document.write(“<strong>Hello</strong>”);
7 ¶¨Òå±äÁ¿   var myVariable = “some value”;
8 ×Ö·û´®Ïà¼Ó var myString = “String1” + “String2”;
9 ×Ö·û´®ËÑË÷  <script language=”JavaScript”><!-- var myVariable = “Hello there”;
var therePlace = myVariable.search(“there”); document.write(therePlace);// --> </script>
10 ×Ö·û´®Ìæ»» thisVar.replace(“Monday”,”Friday”);
11 ¸ñʽ»¯×Ö´® <script language=”JavaScript”><!—
var myVariable = “Hello there”; document.write(myVariable.big() + “<br>”);
document.write(myVariable.blink() + “<br>”); document.write(myVariable.bold() + “<br>”);
document.write(myVariable.fixed() + “<br>”);document.write(myVariable.fontcolor(“red”) + “<br>”);
document.write(myVariable.fontsize(“18pt”) + “<br>”);document.write(myVariable.italics() + “<br>”);
document.write(myVariable.small() + “<br>”);document.write(myVariable.strike() + “<br>”);


Ïà¹ØÎĵµ£º

JavaScriptʹ¹â±ê¶¨Î»µ½Îı¾µÄ×îºó

function  setEnd(field)   {  
      if (field.createTextRange) {  
          var r = field.createTextRange();  
          r.moveS ......

ÈÕ³£javascriptÖ®Ò»

1¡¢ÎÞÌáʾ¹Ø±Õ´°¿Ú
<input type="button" onClick="window.opener = '';window.close();" value="IE6×î¼òµ¥µÄÎÞÌáʾ¹Ø±Õ´°¿Ú" >
2¡¢·ÀÖ¹±»ÈËiframe
if (top.location != self.location)
{
  top.location.href="http://www.34do.net";
}
3¡¢ÅжÏÒ»¸ö¶ÔÏó´æÔÚ²»´æÔÚ
document.all("a")==null£¨²»´æÔÚ£©
......

javaScript ºÍ JavaµÄÇø±ð

JavaScriptÓïÑÔºÍJavaÓïÑÔÊÇÏà¹ØµÄ£¬µ«ËüÃÇÖ®¼äµÄÁªÏµ²¢²»ÏñÏëÏóÖеÄÄÇÑù½ôÃÜ¡£  
   
  ¡¡¡¡   ¶þÕßµÄÇø±ðÌåÏÖÔÚ£º  
  ¡¡¡¡   Ê×ÏÈ£¬ËüÃÇÊÇÁ½¸ö¹«Ë¾¿ª·¢µÄ²»Í¬µÄÁ½¸ö²úÆ·£¬JavaÊÇSUN¹«Ë¾ÍƳöµÄÐÂÒ»´úÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ£¬ÌرðÊʺÏÓÚInternetÓ¦ÓóÌÐò¿ª·¢£»¶øJavaScrip ......

JavaScriptµÄCookies

ʹÓà Cookies¡¡¡¡ÎÒÃÇÒѾ­ÖªµÀ£¬ÔÚ document ¶ÔÏóÖÐÓÐÒ»¸ö cookie ÊôÐÔ¡£µ«ÊÇ Cookie ÓÖÊÇʲô£¿“ijЩ Web
Õ¾µãÔÚÄúµÄÓ²ÅÌÉÏÓúÜСµÄÎı¾Îļþ´æ´¢ÁËһЩÐÅÏ¢£¬ÕâЩÎļþ¾Í³ÆÎª Cookie¡£”—— MSIE °ïÖú¡£Ò»°ãÀ´Ëµ£¬Cookies ÊÇ CGI
»òÀàËÆ£¬±È HTML ¸ß¼¶µÄÎļþ¡¢³ÌÐòµÈ´´½¨µÄ£¬µ«ÊÇ JavaScript Ò²Ìá¹ ......

JavascriptµÄËÄÖּ̳з½Ê½

      ÔÚJavascriptÖУ¬ËùÓпª·¢Õß¶¨ÒåµÄÀà¶¼¿ÉÒÔ×÷Ϊ»ùÀ࣬µ«³öÓÚ°²È«ÐÔ¿¼ÂÇ£¬±¾µØÀàºÍËÞÖ÷À಻ÄÜ×÷Ϊ»ùÀ࣬ÕâÑù¿ÉÒÔ·ÀÖ¹¹«Ó÷ÃÎʱàÒë¹ýµÄä¯ÀÀÆ÷¼¶µÄ´úÂ룬ÒòΪÕâЩ´úÂë¿ÉÒÔ±»ÓÃÓÚ¶ñÒâ¹¥»÷¡£
      Ñ¡¶¨»ùÀàºó£¬¾Í¿ÉÒÔ´´½¨ËüµÄ×ÓÀàÁË¡£ÊÇ·ñʹÓûùÀàÍêÈ«ÓÉÄã¾ö¶¨¡£ÓÐʱ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ