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

javascript ¶ÔÆÁĻλÖü°ä¯ÀÀÆ÷λÖõĻñÈ¡

// ä¯ÀÀÆ÷ÏÔʾÇøÓòµÄ¿íºÍ¸ß£¬ÏòÏ»¹Ô­ºóÖµ»á±äС¡£
document.body.clientWidth;
document.body.clientHeight;
 
// ÓëÉÏÃæµÄÁ½¸öÖµÏà±È£¬ÎÒ¾õµÃ¾ÍÊǼÓÉÏÁ˹ö¶¯ÌõµÄ¿íºÍ¸ß
document.body.offsetWidth;
document.body.offsetHeight;
 
// Õû¸öÍøÒ³µÄ¸ß¶ÈºÍ¿í¶È£¬°üÀ¨¹ö¶¯ÌõÖÐûÓÐÏÔʾ³öÀ´µÄ
document.body.scrollWidth;
document.body.scrollHeight;
 
// ÍøÒ³±»¹ö¶¯Ìõ¹ö¹ýÈ¥µÄ¿íºÍ¸ß
document.body.scrollTop;
document.body.scrollLeft;
 
// Ò³Ãæ×î×óÉϽǵÄλÖþàÕû¸öÆÁÄ»×óÉϽǵľàÀë
window.screenTop;
window.screenLeft;
 
// Õâ¸ö¾ÍÊÇÆÁÄ»·Ö±æÂÊ
window.screen.height;
window.screen.width;
 
// ä¯ÀÀÆ÷×î´ó»¯ºó´°¿ÚµÄ´óС
window.screen.availHeight;
window.screen.availWidth;
 
// Êó±êµÄλÖÃ
event.clentX
event.clentY


Ïà¹ØÎĵµ£º

javascriptʵÏÖÁÄÌì´°¿Ú¹ö¶¯Ìõ×ÜÔÚ×îÏÂÃæµÄ·½·¨

<html>
<head>
<title>javascriptʵÏÖÁÄÌì´°¿Ú¹ö¶¯Ìõ×ÜÔÚ×îÏÂÃæµÄ·½·¨</title>
<script language="javascript">
    function addMessage(message){
        var chatArea=document.getElementById("chatArea");
&n ......

JavascriptÅжϿոñ

ÕýÔò
<script>
 function checkvalue(){
 if(document.Form.content.value.replace(/\s/g,"")=="")
 {
 alert("ÄÚÈݲ»ÄÜΪ¿Õ!");
 document.addForm.content.focus();
 return false;
 }
 document.addForm.submit();
 return ......

javascriptµÄdomReady

»ù±¾ÉÏÿ¸ö¿â¶¼ÓÐÕⶫÎ÷£¬ÒòΪÈç¹ûÒª¶ÔÒ³ÃæÉϵÄÔªËؽøÐвÙ×÷£¬ÎÒÃDZØÐëµÈµ½Ò³Ãæ¼ÓÔØÁËÕâ¸öÔªËزÅÐУ¬·ñÔò»á±¨´í£¬µ«ÊÇÎÒÃǺÜÄÜÅж¨Ä³¸öÔªËØÊÇ·ñÒѼÓÔØ£¬µ«ÎÒÃÇ¿ÉÒÔÅж¨Ò³ÃæÊÇ·ñ¼ÓÔØ£¬Õâ¾ÍÊÇÎÒÃǾ­³£°Ñ´úÂë·Åµ½window.onload = function(){}Ö®ÖеÄÔµÓÉ¡£µ«window.onloadʼþÊÇ´ýµ½Ò³ÃæÉϵÄËùÓÐ×ÊÔ´±»¼ÓÔزż¤»î£¬Èç¹ûÒ³ÃæÉÏÓ ......

javaScript ³£Óü¼ÇÉ£¨Ò»£©


ʼþÔ´¶ÔÏó 
event.srcElement.tagName 
event.srcElement.type
²¶»ñÊÍ·Å 
event.srcElement.setCapture();  
event.srcElement.releaseCapture();  
ʼþ°´¼ü 
event.keyCode 
event.shiftKey 
event.altKey 
event.ctrlKey
ʼþ·µ»ØÖµ 
event ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ