javascriptÕÚÕÖ²ã(ת×Ôwww.cnblogs.com/wjfluisfigo)
//»ñÈ¡ä¯ÀÀÆ÷µÄ¿íºÍ¸ß£¨¶àÖÖä¯ÀÀÆ÷£©
function getNavWidthandHeightInfo()
{
var s = "";
s += " ÍøÒ³¿É¼ûÇøÓò¿í£º"+ document.body.clientWidth;
s += " ÍøÒ³¿É¼ûÇøÓò¸ß£º"+ document.body.clientHeight;
s += " ÍøÒ³¿É¼ûÇøÓò¿í£º"+ document.body.offsetWidth + " (°üÀ¨±ßÏߺ͹ö¶¯ÌõµÄ¿í)";
s += " ÍøÒ³¿É¼ûÇøÓò¸ß£º"+ document.body.offsetHeight + " (°üÀ¨±ßÏߵĿí)";
s += " ÍøÒ³ÕýÎÄÈ«ÎÄ¿í£º"+ document.body.scrollWidth;
s += " ÍøÒ³ÕýÎÄÈ«Îĸߣº"+ document.body.scrollHeight;
s += " ÍøÒ³±»¾íÈ¥µÄ¸ß(ff)£º"+ document.body.scrollTop;
s += " ÍøÒ³±»¾íÈ¥µÄ¸ß(ie)£º"+ document.documentElement.scrollTop;
s += " ÍøÒ³±»¾íÈ¥µÄ×ó£º"+ document.body.scrollLeft;
s += " ÍøÒ³ÕýÎIJ¿·ÖÉÏ£º"+ window.screenTop;
s += " ÍøÒ³ÕýÎIJ¿·Ö×ó£º"+ window.screenLeft;
s += " ÆÁÄ»·Ö±æÂʵĸߣº"+ window.screen.height;
s += " ÆÁÄ»·Ö±æÂÊµÄ¿í£º"+ window.screen.width;
s += " ÆÁÄ»¿ÉÓù¤×÷Çø¸ß¶È£º"+ window.screen.availHeight;
s += " ÆÁÄ»¿ÉÓù¤×÷Çø¿í¶È£º"+ window.screen.availWidth;
s += " ÄãµÄÆÁÄ»ÉèÖÃÊÇ: "+ window.screen.colorDepth +" λ²ÊÉ«";
s += " ÄãµÄÆÁÄ»ÉèÖÃ: "+ window.screen.deviceXDPI +" ÏñËØ/Ó¢´ç";
s += "µ±Ç°´°¿ÚµÄÄÚ²¿¿í¶È:"+ window.innerWidth;
&nbs
Ïà¹ØÎĵµ£º
ÍøÒ³¿É¼ûÇøÓò¿í£º document.body.clientWidth
ÍøÒ³¿É¼ûÇøÓò¸ß£º document.body.clientHeight
ÍøÒ³¿É¼ûÇøÓò¿í£º document.body.offsetWidth (°üÀ¨±ßÏߵĿí)
ÍøÒ³¿É¼ûÇøÓò¸ß£º document.body.offsetHeight (°üÀ¨±ßÏߵĸß)
ÍøÒ³ÕýÎÄÈ«ÎÄ¿í£º document.body.scrollWidth
ÍøÒ³ÕýÎÄÈ«Îĸߣº document.body.scrollHeight ......
‘µãÕý³£Á´½Ó·½·¨ºÜ¶à£¬ÕâÀï½éÉܵÄÊÇ×Ô¶¯µãJavaScriptÁ´½Ó
Function RunJS(scripts)
‘VB ×Ô¶¯µãÍøÒ³ÖеÄJavascriptÁ´½Ó
Dim Document
On Error GoTo ErrHandle
......
JavaScriptΪº¯Êý¶ÔÏó¶¨ÒåÁËÁ½¸ö·½·¨£ºapplyºÍcall£¬ËüÃǵÄ×÷Óö¼Êǽ«º¯Êý°ó¶¨µ½ÁíÍâÒ»¸ö¶ÔÏóÉÏÈ¥ÔËÐУ¬Á½Õß½öÔÚ¶¨Òå²ÎÊýµÄ·½Ê½ÓÐËùÇø±ð£º
Function.prototype.apply(thisArg,argArray);
Function.prototype.call(thisArg[,arg1[,arg2…]]);
´Óº¯ÊýÔÐÍ¿ÉÒÔ¿´µ½£¬µÚÒ»¸ö²ÎÊý¶¼±»È¡ÃûΪthisArg£¬¼´ËùÓк¯ÊýÄÚ²¿µ ......
×î½üÔÚÍøÉϲéÔÄÁ˲»ÉÙJavascript±Õ°ü(closure)Ïà¹ØµÄ×ÊÁÏ£¬Ð´µÄ´ó¶àÊǷdz£µÄѧÊõºÍרҵ¡£¶ÔÓÚ³õѧÕßÀ´Ëµ±ð˵Àí½â±Õ°üÁË£¬¾ÍÁ¬ÎÄ×ÖÐðÊö¶¼ºÜÄÑ¿´¶®¡£×«Ð´´ËÎĵÄÄ¿µÄ¾ÍÊÇÓÃ×îͨË×µÄÎÄ×Ö½Ò¿ªJavascript±Õ°üµÄÕæÊµÃæÄ¿¡£
¡¡¡¡Ò»¡¢Ê²Ã´ÊDZհü£¿
¡¡¡¡“¹Ù·½”µÄ½âÊÍÊÇ£ºËùν“±Õ°ü”£¬Ö¸µÄÊÇÒ»¸öÓµÓÐÐ ......
function MyObject1(formalParameter){
alert("MyObject1");
this.testNumber = formalParameter;
//1
this.toString= function(){
alert("MyObject1:"+this.testNumber);
&nbs ......