ÈçºÎÅжÏjavascriptÖвÎÊýÀàÐÍ£¬¶ÔÏóÀàÐÍ¡£
Ò»°ã£ºobject.constructor == String ;(String »òÕßNumber µÈµÈ )
ÌØÊ⣺ÅжÏÒ»¸öÊý×éArray
·½·¨1£º
Object
.prototype.toString.apply(value) ===
'[object Array]'
·½·¨2£º
ÓÃjQuery£¬ÆäʵºÍ·½·¨1ͬ¡£
$.isArray(object);
Ïà¹ØÎĵµ£º
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐĿǰ¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×î¶¥¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×î¶¥¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title>ÎÞÏÞ¼¶Ê÷Ð ......
ÎÒgoogleÒ»ÏÂ,ÒÑÓÐÈË·ÒëÁË´ËÎÄ.¸Ð¾õ±ÈÎÒ·ÒëµÄÒªºÃ!ÊÇÒëÑÔÕ¾·ÒëµÄ
¼ûwww.yeeyan.com/articles/view/92135/47626/dz
ÔÎļû:http://code.google.com/intl/zh-CN/speed/articles/optimizing-javascript.html
²»ºÏÊʵĵط½,Çë´ó¼ÒÖ¸³öÀ´!Ï£Íû¶ÔÄãÓÐÓÃ!
&nb ......
1.<select></select>±êǩӦÓÃ
ͨ³£µÄд·¨ÊÇ£º
<select onchange="javascript:windwo.open(this.options[this.selectedIndex].value)">
<option>MAIN</option>
& ......
¼æÈÝIE¡¢FireFox¡¢Chrome
//¼ÓÔØjs
function loadJs(){
if (!getObj('script_PlData')){
var scriptObj= document.createElement("script");
//scriptObj.id = 'script_1';
&nb ......