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

ÈÏʶjavascriptµÄObject¹¦ÄÜÓëÐÔÖÊ

jsÖеÄÈκζÔÏ󶼼̳ÐObjectº¯ÊýÀ࣬Òò´Ë¶¼Object.prototype°üº¬µÄËùÓз½·¨¡£½ñÌìÎÒ¾ÍÀ´ÌÖÂÛÏÂÕâЩ×î»ù±¾µÄ·½·¨ºÍÔõÑùÈ¥ÖØд¡£
Ê×ÏÈ£¬°üº¬7¸ö×î»ù±¾µÄº¯Êý£º
function A()
{
var obj = {};
obj.constructor //Objectº¯Êý
obj.hasOwnProperty //ÅжϲÎÊýÊÇ·ñÊÇobj¶ÔÏóµÄ±¾µØ·ÇprotorypeÊôÐÔ
obj.isPrototypeOf //ÅжϲÎÊýÊÇ·ñÊÇobj¶ÔÏóµÄprototype¼Ì³ÐµÄÊôÐÔ
obj.propertyIsEnumerable() //ÓëhasOwnPropertyÀàËƺ¬ÒåµÄ·½·¨£¬±íʾÊÇ·ñÄÜö¾Ù
obj.toLocaleString() //·µ»Ø¶ÔÏó±íʾ±¾µØµÄ×Ô¼ºµÄ×Ö·û´®
obj.toString() //·µ»Ø¶ÔÏó±íʾ±¾µØµÄ×Ô¼ºµÄ×Ö·û´®, µ±ÐèÒª¶ÔÏó ת»¯Îª×Ö·û´®µÄʱºò£¬½âÊÍÆ÷»á×Ô¶¯µ÷Óøú¯Êý¡£Èçalert(obj)
obj.valueOf() //·µ»Ø¶ÔÏóµÄÊýÖµÀàÐÍÖµ£¬Èç new Date() +2»á×Ô¶¯µ÷Óøú¯Êý¶øµÃµ½Ò»¸öÊýÖµÀàÐÍÖµ£¬µ«Object.prototypeÖеÄvalueOfÓëtoStringÀàÐÍ¡£obj+3 »¹ÊÇÒ»¸ö×Ö·û´®
}
ÄÇôÔõÑùÈ¥ÖØдËûÃÇÄØ£¿
Ò»°ãÖ÷ÒªÒªÖØдtoString  ºÍ valueOf·½·¨
new Date() +2 //»á×Ô¶¯µ÷Óøú¯Êý¶øµÃµ½Ò»¸öÊýÖµÀàÐÍÖµ£¬ËµÃ÷DateÀàÒѾ­ÖØд¹ýValueOf()·½·¨ÁË¡£
alert("Êý×éΪ£º" + [0, 1, 2, 3]) //Êä³ö×Ö·û´®£¬ËµÃ÷ArrayÀàÒѾ­ÖØд¹ýtoString·½·¨ÁË¡£
  


Ïà¹ØÎĵµ£º

ÔÚPBÖÐʹÓÃJavaScript½Å±¾º¯Êý

ÔÚPBÖÐʹÓÃJavaScript½Å±¾º¯Êý
ÔÚPBÖÐʹÓÃJavaScript½Å±¾º¯Êý
ÏÖÔÚÐí¶àµÄÐÅϢϵͳ¶¼ÊÇ»ùÓÚB/S°æ±¾£¬µ«PBдµÄÐÅϢϵͳÉú´æ¿Õ¼äÒ²±È½Ï´ó£¬ÍùÍùÊÇÒ»¸öÐÅϢϵͳ¼´ÓÐPB°æ±¾Ò²ÓÐB/S°æ±¾¡£ÐÅϢϵͳ»áÓÐÐí¶àµÄÒµÎñ¹æÔò£¬B/SÖÐÒµÎñ¹æÔòµÄ¼ì²éÔÚJavaScript½Å±¾ÖÐʵÏÖ£¬Èç¹ûÔÚPBÖÐÓÖʵÏÖÒ»´Î£¬·Ñʱ·ÑÁ¦²»Ëµ£¬
ÒµÎñ¹æÔò¸Ä±äÓÖÒªÖØб ......

javascript ÉèÖÃcookie×¢ÒâÊÂÏî

javascript ÉèÖÃcookie×¢ÒâÊÂÏî
javascript ÉèÖÃcookie×¢ÒâÊÂÏî
ÔÚJavascript ÖУ¬cookie ¿ÉÒÔͨ¹ý document.cookie½øÐÐÉèÖ㬵±ÉèÖöà¸öcookieʱä¯ÀÀÆ÷»á×Ô¶¯°Ñ
ËüÃÇÓ÷ֺŸô¿ª¡£ÈçÏ£º
document.cookie = 'cookie1';
document.cookie ='cookie2';
alert (document.cookie) ;//Êä³ö cookie1 ; cookie2
µ«ÊÇÈç¹û°ÑµÚ ......

Ò»¸ö´øCheckBoxµÄÊ÷ÐÎĿ¼µÄµÝ¹éËã·¨£¨javascript£©

Ô­´´ÓÚ2007Äê12ÔÂ16ÈÕ£¬2009Äê10ÔÂ15ÈÕǨÒÆÖÁ´Ë¡£
°¦£¬ºÜ¾ÃÒÔǰдµÄ´úÂ룬ɹһɹ£¬¹À¼Æ×Ô¼º¿´¶¼¿´²»¶®ÁË£¬:(
var head="display:''"
img_close=new Image()
img_close.src="/sysManage/images/f.gif"
img_open=new Image()
img_open.src="/sysManage/images/fo.gif"
img3=new Image( ......

JavascriptʵÀý½Ì³Ì(1) ´´½¨µ¯³öʽ´°¿Ú

ÀûÓÃJavascript´´½¨µ¯³öʽ´°¿ÚµÄÄ¿µÄʵ¼ÊÉÏÊÇ´ò¿ªÁíÍâµÄä¯ÀÀÆ÷´°¿Ú¡£Äã¿ÉÒÔÉèÖÃÕâ¸öä¯ÀÀÆ÷´°¿ÚµÄһЩÊôÐÔ£¬Èç¸ß¶È¡¢¿í¶ÈÒÔ¼°ÊÇ·ñÈøô°¿ÚÓÐÒ»¸ö״̬Ìõ»òÕß¹¤¾ßÌõ¡£ÔÚÏÂÃæµÄÀý×ÓÖУ¬ÎÒ½«´°¿ÚÉèÖÃΪ£º350
x 400£¬¼´¸ß¶ÈΪ350ÏñËØ£¬¿í¶ÈΪ400ÏñËØ£»ÆäÖÐÒ²°üÀ¨ÁËÁíÍâµÄһЩÉèÖã¬Èç¹ö¶¯Ìõ£»¶ø½«ÆäËüµÄÉèÖã¨Èç״̬Ìõ¡¢²Ëµ¥Ìõ£© ......

JavascriptʵÀý½Ì³Ì(6) ÀûÓÃJavascript½øÐÐÃÜÂë±£»¤

Ëæ×Å»¥ÁªÍøµÄ·ÉËÙ·¢Õ¹£¬µØÇò±äµÃÔ½À´Ô½Ð¡£¬ÈËÃÇ¿ÉÒÔ¿çԽʱ¼äºÍ¿Õ¼äµÃ½çÏÞ½øÐн»Á÷ÓÚºÏ×÷¡£µ«ÊÇËæÖ®Ò²²úÉúÁËһЩËÁÒâ¸ãÆÆ»µµÄºÚ¿Í£¬Õâ¾ÍʹµÃ³ÌÐòÉè¼ÆÈËÔ±ÔÚ±àÖÆÓ¦ÓóÌÐòÖÐÒª¿¼Âǵ½ºÚ¿ÍÏ®»÷Õâ¸öÎÊÌ⣬ËùÒÔ×ÔÈ»¶øÈ»µØ¾Í»áÏëµ½±£»¤¡£±¾½Ú½Ì³Ì½«½ÌÄãÔõÑùÀûÓÃjavascript½øÐÐÃÜÂë±£»¤¡£ÀûÓà JavaScriptÀ´¶ÔÍøÒ³½øÐÐÃÜÂë±£»¤Óм¸ÖÖ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ