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

ÈçºÎÎÒjavaScript»ñÈ¡´°¿ÚµÄ¸ß¶ÈºÍ¿í¶È

ÔÚjavascriptÖеõ½µ±Ç°´°¿ÚµÄ¸ßºÍ¿í
<body><SCRIPT LANGUAGE="JavaScript">
var  s = "";
s += "\r\nÍøÒ³¿É¼ûÇøÓò¿í£º"+ document.body.clientWidth;
s += "\r\nÍøÒ³¿É¼ûÇøÓò¸ß£º"+ document.body.clientHeight;
s += "\r\nÍøÒ³¿É¼ûÇøÓò¿í£º"+ document.body.offsetWidth  +" (°üÀ¨±ßÏߺ͹ö¶¯ÌõµÄ¿í)";
s += "\r\nÍøÒ³¿É¼ûÇøÓò¸ß£º"+ document.body.offsetHeight +" (°üÀ¨±ßÏߵĿí)";
s += "\r\nÍøÒ³ÕýÎÄÈ«ÎÄ¿í£º"+ document.body.scrollWidth;
s += "\r\nÍøÒ³ÕýÎÄÈ«Îĸߣº"+ document.body.scrollHeight;
s += "\r\nÍøÒ³±»¾íÈ¥µÄ¸ß£º"+ document.body.scrollTop;
s += "\r\nÍøÒ³±»¾íÈ¥µÄ×ó£º"+ document.body.scrollLeft;
s += "\r\nÍøÒ³ÕýÎIJ¿·ÖÉÏ£º"+ window.screenTop;
s += "\r\nÍøÒ³ÕýÎIJ¿·Ö×ó£º"+ window.screenLeft;
s += "\r\nÆÁÄ»·Ö±æÂʵĸߣº"+ window.screen.height;
s += "\r\nÆÁÄ»·Ö±æÂÊµÄ¿í£º"+ window.screen.width;
s += "\r\nÆÁÄ»¿ÉÓù¤×÷Çø¸ß¶È£º"+ window.screen.availHeight;
s += "\r\nÆÁÄ»¿ÉÓù¤×÷Çø¿í¶È£º"+ window.screen.availWidth;
s += "\r\nÄãµÄÆÁÄ»ÉèÖÃÊÇ "+ window.screen.colorDepth +" Î»²ÊÉ«";
s += "\r\nÄãµÄÆÁÄ»ÉèÖà"+ window.screen.deviceXDPI +" ÏñËØ/Ó¢´ç";
alert(s);
</SCRIPT>


Ïà¹ØÎĵµ£º

[·­Òë]High Performance JavaScript(019)

µÚÁùÕ  Responsive Interfaces  ÏìÓ¦½Ó¿Ú
    There's nothing more frustrating than clicking something on a web page and having nothing happen. This problem goes back to the origin of transactional web applications and resulted in the now-ubiquitous "please click only once" m ......

[·­Òë]High Performance JavaScript(022)

µÚÆßÕ  Ajax  Òì²½JavaScriptºÍXML
    Ajax is a cornerstone of high-performance JavaScript. It can be used to make a page load faster by delaying the download of large resources. It can prevent page loads altogether by allowing for data to be transferred between the client ......

[·­Òë]High Performance JavaScript(033)

Summary  ×ܽá
    When web pages or applications begin to feel slow, analyzing assets as they come over the wire and profiling scripts while they are running allows you to focus your optimization efforts where they are needed most.
    µ±ÍøÒ³»òÓ¦ÓóÌÐò±äÂýʱ£¬·ÖÎ ......

JavaScript±à³Ì±Ê¼Ç

ÐÂÖÐ……
1¡¢Êý¾ÝÀàÐÍÑéÖ¤ÎÊÌâ
  Asp.NetËäÈ»ÓÐÑéÖ¤¿Ø¼þ£¬µ«ÊÇÓÐЩ¸´ÔÓµÄÑéÖ¤»¹Êǵô«µ½·þÎñÆ÷ÉϽøÐУ¬ÓÃjsËٶȺÍÐÔÄܶ¼±È½ÏºÃ
<script>
 //¼ì²éÊÇ·ñΪÈÎÒâÊý£¨ÊµÊý£©
function isNumeric(strNumber) {
var newPar=/^(-|\+)?\d+(\.\d+)?$/
alert(newPar.test(strNumber)); }
 //¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ