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

javascriptʵÏÖÈÕÆÚÐÇÆÚµÄÏÔʾ

<html>
<body>
<mce:script language=javascript><!--
todayDate = new Date();
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
document.write("½ñÌìÊÇ")
document.write("<br>")
if(navigator.appName == "Netscape")
{
document.write(1900+year);
document.write("Äê");
document.write(month);
document.write("ÔÂ");
document.write(date);
document.write("ÈÕ");
document.write("<br>")
}
if(navigator.appVersion.indexOf("MSIE") != -1)
{
document.write(year);
document.write("Äê");
document.write(month);
document.write("ÔÂ");
document.write(date);
document.write("ÈÕ");
document.write("<br>")
}
if (todayDate.getDay() == 5) document.write("ÐÇÆÚÎå")
if (todayDate.getDay() == 6) document.write("ÐÇÆÚÁù")
if (todayDate.getDay() == 0) document.write("ÐÇÆÚÈÕ")
if (todayDate.getDay() == 1) document.write("ÐÇÆÚÒ»")
if (todayDate.getDay() == 2) document.write("ÐÇÆÚ¶þ")
if (todayDate.getDay() == 3) document.write("ÐÇÆÚÈý")
if (todayDate.getDay() == 4) document.write("ÐÇÆÚËÄ")
// --></mce:script>
</body>
</html>


Ïà¹ØÎĵµ£º

javascript ѧϰ±Ê¼Ç£¨6£©

1. window ¶ÔÏóÊÇÕû¸ö BOM µÄºËÐÄ,ËùÓжÔÏóºÍ¼¯ºÏ¶¼ÒÔijÖÖ·½Ê½»Ø½Óµ½ window ¶ÔÏó.
          window ¶ÔÏó±íʾÕû¸öä¯ÀÀÆ÷´°¿Ú,µ«²»±íʾÆäÖаüº¬µÄÄÚÈÝ.
2. ¿ª·¢Õß¿ÉÒÔʹÓà window ¶ÔÏóÒƶ¯ºÍµ÷Õûä¯ÀÀÆ÷´°¿ÚµÄ±íÏÖÐÎʽ.
    window.moveBy(dx,dy); //Ïà¶Ôµ±Ç°Î»ÖÃ,ˮƽÒƶ ......

javascriptʼþÇý¶¯¿ò¼Ü ÊÕ²Ø

  javascriptʼþÇý¶¯¿ò¼Ü ÊÕ²Ø
Ò»¸ö¼òµ¥µÄʼþÇý¶¯¿ò¼ÜµÄÑÝʾ£º
/*ControlDemo.js*/
//ʼþÇý¶¯¿ò¼Ü£¨ÑÝʾ£©
function ControlDemo(page)
{
 //³õʼ»¯Page
 if (page == null)
 {
  page = self;
 }
 if (page != self)
 {
  //Do sth. here...
 }
&nb ......

Javascript Ô­Ðͺͼ̳Ð(Prototypes and Inheritance)

Javascript Ô­Ðͺͼ̳Ð(Prototypes and Inheritance) ÊÕ²Ø
 Ç°ÃæÎÒÃÇ¿´µ½ÁËÈçºÎʹÓà constructor À´³õʼ»¯¶ÔÏó¡£Èç¹ûÕâÑù×ö£¬ÄÇôÿһ¸ö´´½¨µÄжÔÏ󶼻á¶ÔÄÇЩÏàͬµÄÊôÐÔ£¬·½·¨½¨Á¢Ò»¸ö¶ÀÁ¢µÄ¸±±¾¡£¶øʵ¼ÊÉÏÓиü¼ÓÓÐЧµÄ·½·¨À´Ö¸¶¨·½·¨£¬³£Á¿£¬ÒÔ¼°ÆäËûһЩ¿É±»ËùÓиÃÀàµÄ¶ÔÏó¹²ÏíµÄÊôÐÔ¡£
JavaScript ¶ÔÏó´ÓÒ»¸ö ......

JavascriptÈÕÆÚ´¦ÀíÖÐÕýÔòµÄÓ¦ÓÃ


ÕýÔò±í´ïʽÊÇÒ»¸ö·Ç³£·Ç³£·Ç³£Ç¿´óµÄÓïÑÔ£¬ÕâÀïÁ¬ÐøÓÃÁËÈý¸ö·Ç³££¬ÎÒ¾õµÃ»¹²»¹»£¬Ëü½¿Ð¡µ«È´¹¦
ÄÜÇ¿´ó£¬¾ø¶ÔµÄŨËõµÄ¾ÍÊǾ«»ª£¬ÎÒ·¢ÏÖÎÒÔ½À´Ô½Ï²»¶ËüÁË¡£
Õâ¶Îʱ¼ä×öÈÕÆڵĴ¦Àí£¬ÐèÒªÓõ½ÈÕÆڵļÆË㣬°üÀ¨¼Ó¼õʲôµÄ£¬ÓÚÊÇ×öÁËÒ»¸ö¹«Óô¦ÀíµÄÀ©Õ¹£¬½Ð
String.prototype.dateExpression¡£ÒòΪÈÕÆÚ´¦Àí¶¼»áÓõ½±í´ïʽ£¬À ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ