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

JavaScriptÖ®ÐÅÏ¢µÄ·â×°

/*
* JavaScriptÖ®ÐÅÏ¢µÄ·â×°
* ÔÚ±àÂëǰ£¬ÎÒÃÇÐèÒªÁ˽âÈçϼ¸¸öÊõÓ
* ·â×°£º¶ÔÄÚ²¿Êý¾ÝµÄ±íÏÖÐÎʽºÍʵʩϸ½Ú½øÐÐÒþ²Ø£»
* ˽ÓÐÊôÐԺͷ½·¨£ºÍâ½çÖ»ÄÜͨ¹ýÆä¹«¿ªµÄ½Ó¿ÚÓëÆä½øÐдæÈ¡ºÍ½»»¥
* ×÷ÓÃÓò£ºJavaScriptÖУ¬Ö»Óк¯Êý¾ßÓÐ×÷ÓÃÓò£¬º¯ÊýÄÚ²¿¶¨ÒåµÄÊôÐԺͷ½·¨ÔÚÍⲿÎÞ·¨·ÃÎÊ
* ÌØÈ¨·½·¨£ºÉùÃ÷ÔÚº¯ÊýÄÚ²¿£¬ÄÜ·ÃÎʺ¯ÊýÄÚ²¿±äÁ¿£¨ÊôÐÔ£©µÄ·½·¨£¬±È½ÏºÄ·ÑÄڴ棻
*/
function Person()
{
/*
* ÉùÃ÷˽ÓеÄÊý¾Ý
* êdzƣ¬ÄêÁ䣬ÓÊÏä
*/
var nickName, age, email;
/*
* ÐèÒª·ÃÎÊ˽ÓÐÊý¾ÝµÄ·½·¨(ÌØÈ¨·½·¨)
* ÿÉú³ÉÒ»¸öʵÀý½«ÎªÌØÈ¨·½·¨Éú³ÉÒ»¸öеĸ±±¾
*/
this.setData = function(pNickName, pAge, pEmail)
{
nickName = pNickName;
age = pAge;
email = pEmail
};
this.getData = function()
{
return [nickName, age, email];
}
}
/*
* ²»ÐèÒªÖ±½Ó·ÃÎÊ˽ÓÐÊý¾ÝµÄ·½·¨£¨¹«Óз½·¨£©
* ²»¹ÜÉú³É¶àÉÙʵÀý£¬¹«Óз½·¨ÔÚÄÚ´æÖÐÖ»´æÔÚÒ»·Ý
*/
Person.prototype = {
showData: function()
{
alert("¸öÈËÐÅÏ¢£º" + this.getData().join());
}
}
/*
* Íⲿ´úÂëͨ¹ý˽Óлò¹«Óз½·¨´æÈ¡ÄÚ²¿ÊôÐÔ
*/
var p = new Person();
p.setData("sky", "26", "vece@vip.qq.com");
p.showData();


Ïà¹ØÎĵµ£º

javascript StyleSheetÑùʽ²Ù×÷Àà

ÔçÉÏÔÚcsdnÉÏ¿´ÓÐÈËÎÊÒ³Ãæstyle sheetÔõôÐÞ¸ÄÀïÃæµÄrule,¾ÍдÁ˸öÀà,¸ÃÀà¶Ô¼æÈÝFFºÍIE×öÁË´¦Àí¡£
/**//*--------------------------------------------
    ÃèÊö : Ìí¼ÓеÄÑùʽrule
    ²ÎÊý : styleSheetsË÷Òý
    ´úÂë :&nb ......

JavaScriptÖÐArray£¨Êý×飩µÄÊôÐԺͷ½·¨

Êý×éÓÐËÄÖÖ¶¨ÒåµÄ·½Ê½
ʹÓù¹Ô캯Êý£º
var a = new Array();
var b = new Array(8);
var c =
new Array("first", "second", "third");
»òÕßÊý×éÖ±½ÓÁ¿£º
var d = ["first",
"second", "third"];
ÊôÐÔ
ArrayÖ»ÓÐÒ»¸öÊôÐÔ£¬¾ÍÊÇlength£¬length±íʾµ ......

ʵÓÃµÄ JavaScript ²âÊÔ¼°Ð§Ñ鹤¾ß


ת×Ôwww.cnbeta.com/articles/108735.htm
JavaScript ÊÇÒ»¿îÇ¿´óµÄ¹ã·ºÔËÓÃÓÚÏÖ´úWebÕ¾µã¼°Ó¦ÓõĽű¾ÓïÑÔ¡£×÷Ϊһ¸ö¼¼ÒÕ¾«Õ¿µÄ Web ¿ª·¢Õߣ¬ÕÆÎÕJavaScript¿ÉÒÔÔöÇ¿Óû§µÄʹÓÃÌåÑ飬Ìṩ½»»¥¼°¸»¿Í»§¶ËµÈ¹¦ÄÜ¡£
¾¡¹ÜJavaScript µÄÓï·¨·Ç³£¼òµ¥£¬µ«¶ÔÓÚд³ÌÐò¶øÑÔÈÔÈ»ÊÇÀ§ÄÑÖØÖØ£¬¾ÍÊÇÒòΪËüµÄÔËÐл·¾³£º»ùÓÚ ......

JavaScriptÖÐtoGMTStringº¯Êý

JavaScriptÖÐtoGMTStringº¯Êý·½·¨ÊÇ·µ»ØÒ»¸öÈÕÆÚ£¬¸ÃÈÕÆÚÓøñÁÖÍþÖαê׼ʱ¼ä (GMT) ±íʾ²¢Òѱ»×ª»»Îª×Ö·û´®¡£Ê¹Ó÷½·¨£º
dateObj .toGMTString()
JavaScriptÖÐtoGMTStringº¯Êý·½·¨ÒѾ­¹ýʱ£¬Ö®ËùÒÔÈÔÈ»ÌṩÕâ¸ö·½·¨£¬Ö»ÊÇΪÁËÌṩÏòºóµÄ¼æÈÝÐÔ¡£ÍƼö¸ÄÓà toUTCString ·½·¨¡£
toGMTString ·½·¨·µ»ØÒ»¸ö String ¶ÔÏó£¬´Ë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ