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
ÍøÒ³ÕýÎIJ¿·ÖÉÏ£º window.screenTop
ÍøÒ³ÕýÎIJ¿·Ö×ó£º window.screenLeft
ÆÁÄ»·Ö±æÂʵĸߣº window.screen.height
ÆÁÄ»·Ö±æÂÊµÄ¿í£º window.screen.width
ÆÁÄ»¿ÉÓù¤×÷Çø¸ß¶È£º window.screen.availHeight
ÆÁÄ»¿ÉÓù¤×÷Çø¿í¶È£º window.screen.availWidth
»ñÈ¡ÍøÒ³±»¾íÈ¥µÄ¸ß£¬ÖÆ×÷¸¡¶¯´°Ìå¿ÉÓãº
function GetScrollY()
{
if (typeof window.pageYOffset == 'number')
{
return window.pageYOffset;
}
var CompatMode = window.document.compatMode;
var DocumentElement = window.document.documentElement;
if ((typeof CompatMode == 'string') &&
(CompatMode.indexOf('CSS') >= 0) &&
(DocumentElement) && (typeof
DocumentElement.getAttribute("scrollTop") ==
'number'))
{
return DocumentElement.getAttribute("scrollTop");
}
var Body = window.document.body ;
if ((Body) && (typeof Body.getAttribute("scrollTop") == 'number'))
{
return Body.getAttribute("scrollTop");
}
return 0;
}
ÏÂÃæÊÇ“ÎÞ¶¨Òå HTML µÄ Event ʼþ”µÄ²âÊÔ´úÂ룬·Ö±ðÓà IE ºÍ Firefox ´ò¿ª£¬µã»÷Ò³Ãæ¾Í¿É¿´µ½½á¹û¡£ <html>
Ïà¹ØÎĵµ£º
ÔÚÉÏÃæµÄʾÀýÖУ¬ÎÒÃǶ¨ÒåÁËÁ½¸öÓï·¨¸Ê¶£¬Ò»¸öÊÇClass()º¯Êý£¬Ò»¸öÊÇNew()º¯Êý¡£Ê¹ÓÃClass()¸Ê¶£¬ÎÒÃÇÒѾ¿ÉÒÔÓ÷dz£ÓÅÑŵĸñʽ¶¨ÒåÒ»¸öÀà¡£ÀýÈçÇ°ÀýÖеģº
var
Employee
=
Class(Person,
//
ÅÉÉúÖÁPersonÀà
{
......
JavaScriptºËÐļ¼Êõ
http://book.jqcq.com/product/620915.html
±¾Êéͨ¹ýÐí¶à»ùÓÚWebµÄÀý×ÓչʾÁË£ºÈçºÎ¹¹½¨JavaScriptÂß¼ºÍ½«ËüÓëÏÖÓеĶÔÏó½á¹¹Á¬½Ó£¬ÈçºÎ¹¹½¨×Ô¼ºµÄ³ÌÐò¿âÒÔ¼°ÈçºÎÀûÓÃÆäËûJavaScriptÓû§±àдµÄ³ÌÐò¿â¡£
JavaScript ÍêÈ«ÊÖ²á JavaScript ÍêÈ«ÊÖ²á
http://book.jqcq.com/product/320819.html
......
JavaScriptºËÐļ¼Êõ
http://book.jqcq.com/product/620915.html
±¾Êéͨ¹ýÐí¶à»ùÓÚWebµÄÀý×ÓչʾÁË£ºÈçºÎ¹¹½¨JavaScriptÂß¼ºÍ½«ËüÓëÏÖÓеĶÔÏó½á¹¹Á¬½Ó£¬ÈçºÎ¹¹½¨×Ô¼ºµÄ³ÌÐò¿âÒÔ¼°ÈçºÎÀûÓÃÆäËûJavaScriptÓû§±àдµÄ³ÌÐò¿â¡£
JavaScript ÍêÈ«ÊÖ²á JavaScript ÍêÈ«ÊÖ²á
http://book.jqcq.com/product/320819.html
......
Ò³ÃæÄÚǶ²»Í¬µÄÍøÒ³ÄÚÈÝʱ£¬µ¼ÖÂiframeµÄ¸ß¶ÈÎÞ·¨ÓëʵÏÖÄÚÈÝ»òä¯ÀÀÆ÷¸ß¶ÈÏàÆ¥Åä¡£´°¿Ú´óС±ä»»Ê±£¬²»ÄÜiframe²»ÄܽøÐÐ×Ô¶¯µ÷Õû¡£ÕâÀÎÒÃÇÀûÓÃJAVASCRIPTÈÃIFRAME¿ò¼ÜµÄ¸ß¶È×ÔÊÊÓ¦¡£
Ê×ÏÈ£¬Ð´³öÈçϵÄJS·½·¨¡£
/**
* ÄÚǶҳÃæµÄ¸ß¶ÈÉèÖÃ
*/
function handleFrameLoad() {
var hDoc = getBodyHeight(document);
var ......
±Õ°ü£¨closure£©ÊÇJavascriptÓïÑÔµÄÒ»¸öÄѵ㣬ҲÊÇËüµÄÌØÉ«£¬ºÜ¶à¸ß¼¶Ó¦Óö¼ÒªÒÀ¿¿±Õ°üʵÏÖ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄѧϰ±Ê¼Ç£¬¶ÔÓÚJavascript³õѧÕßÓ¦¸ÃÊǺÜÓÐÓõġ£
Ò»¡¢±äÁ¿µÄ×÷ÓÃÓò
ÒªÀí½â±Õ°ü£¬Ê×ÏȱØÐëÀí½âJavascriptÌØÊâµÄ±äÁ¿×÷ÓÃÓò¡£
±äÁ¿µÄ×÷ÓÃÓòÎ޷ǾÍÊÇÁ½ÖÖ£ºÈ«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£
JavascriptÓïÑÔµÄÌØÊâÖ®´¦£¬¾ÍÔÚÓ ......