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

ͨ¹ýJavaScript½øÐÐÑéÖ¤

ʵÀýÈçÏ£ºjavascript.htmlÎļþ
 
<html>
     <head>
          <title>JavaScriptÑéÖ¤</title>
     </head>
 
     <script language='JavaScript'>
          function check()
          {
                if(form1.text1.value=="")  //ÑéÖ¤ÐÕÃûÊÇ·ñΪ¿Õ
                {
                       window.alert("Óû§Ãû²»ÄÜΪ¿Õ£¬ÇëÖØÐÂÊäÈë");
                       form1.elements(0).focus();
                }
                else if(form1.text2.value=="")  //ÑéÖ¤EmaiÊÇ·ñΪ¿Õ
                {
                       window.alert("Email²»ÄÜΪ¿Õ£¬ÇëÖØÐÂÊäÈë");
                       form1.elements(1).focus();
                }
                else if(form1.text2.value.indexOf('@')==-1)  //ÑéÖ¤EmaiÊÇ·ñûÓÐ@¶øÊäÈë´íÎó
     &n


Ïà¹ØÎĵµ£º

Javascript+css ʵÏÖÍøÒ³»»·ô¹¦ÄÜ


ÏÖÔÚÍøÕ¾»»Æ¤·ôÊDZȽϳ£¼ûµÄ¹¦ÄÜ£¬´ó¶àÊýÂÛ̳¶¼Óеģ¬ÒªÏëʵÏÖÕâÑùЧ¹û¿ÉÒÔ¿´ÈçÏ´úÂ룺Html´úÂ벿·Ö:
1.ÒªÓÐÒ»¸ö´øidµÄÑùʽ±íÁ´½Ó,ÎÒÃÇҪͨ¹ý²Ù×÷Õâ¸öÁ´½ÓÀ´µ÷Óò»Í¬µÄhref.
<link href="css/main0.css" rel="stylesheet" type="text/css" id="cssfile" />
2.Ƥ·ôÑ¡Ôñ°´Å¥(ºǫ́Ϊÿ¸öliÌí¼Óonclickʼþ,´¥·¢»»· ......

javascriptÒ»¶Îʱ¼ä´úÂë

<SCRIPT language=javaScript>
<!--
now = new Date(),hour = now.getHours()
if(hour < 6){document.write("Á賿ºÃ!")}
else if (hour < 9){document.write("ÔçÉϺã¡")}
else if (hour < 12){document.write("ÉÏÎçºÃ£¡")}
else if (hour < 14){document.write("ÖÐÎçºÃ£¡")}
else if (hour &l ......

¼ÓËÙJavascript£ºDOM²Ù×÷ÓÅ»¯

Ô­ÎÄ£º¡¶Speeding
up JavaScript: Working with the DOM¡·
×÷Õߣº KeeKim Heng, Google Web Developer
ÔÚÎÒÃÇ¿ª·¢»¥ÁªÍø¸»Ó¦Óã¨RIA£©Ê±£¬ÎÒÃǾ­³£Ð´Ò»Ð©javascript½Å±¾À´Ð޸ĻòÕßÔö¼ÓÒ³ÃæÔªËØ£¬ÕâЩ¹¤×÷×îÖÕÊÇDOM——»òÕß˵Îĵµ¶ÔÏóÄ£
ÐÍ——À´Íê³ÉµÄ£¬¶øÎÒÃǵÄʵÏÖ·½Ê½»áÓ°Ïìµ½Ó¦ÓõÄÏìÓ¦Ëٶȡ£ ......

JavaScriptµÄfunction

º¯ÊýÊǽøÐÐÄ£¿é»¯³ÌÐòÉè¼ÆµÄ»ù´¡£¬±àд¸´ÔÓµÄAjaxÓ¦ÓóÌÐò£¬±ØÐë¶Ôº¯ÊýÓиüÉîÈëµÄÁ˽⡣
¡¡¡¡javascriptÖеĺ¯Êý²»Í¬ÓÚÆäËûµÄÓïÑÔ£¬Ã¿¸öº¯Êý¶¼ÊÇ×÷Ϊһ¸ö¶ÔÏó±»Î¬»¤ºÍÔËÐеġ£Í¨¹ýº¯Êý¶ÔÏóµÄÐÔÖÊ£¬¿ÉÒԺܷ½±ãµÄ½«Ò»¸öº¯Êý¸³Öµ¸øÒ»¸ö±äÁ¿»òÕß½«º¯Êý×÷Ϊ²ÎÊý´«µÝ¡£ÔÚ¼ÌÐø½²Êö֮ǰ£¬ÏÈ¿´Ò»Ïº¯ÊýµÄʹÓÃÓï·¨£º
ÒÔÏÂÊÇÒýÓÃƬ¶Î ......

JavaScriptÖеÄDate¶ÔÏó

1.ÉùÃ÷Ò»¸öDateʱ¼ä¶ÔÏóµÄ·½Ê½ÓÐÒÔÏÂÈýÖÖ
     Date()£º±íʾ¹¹ÔìÒ»¸öµ±Ç°ÏµÍ³Ê±¼ä¶ÔÏó
     Date(int year,int month,int day)£º¹¹ÔìµÄʱ¼ä¶ÔÏóËùÖ¸ÏòµÄʱ¼äΪ Ä꣺1900+year;Ô£ºmonth+1;ÈÕ£ºday;ʱ,·Ö,Ã룺00
     Date(int millsecond)£º¹¹ÔìµÄʱ¼ä¶ÔÏó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ