[תÌû]JavaScript´°Ìå´óС
[תÌû]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
HTML¾«È·¶¨Î»:scrollLeft,scrollWidth,clientWidth,offsetWidth
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetLeft:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓÉ offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¼ÆËã×ó²àλÖÃ
offsetTop:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓÉ offsetTop ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¼ÆË㶥¶ËλÖÃ
event.clientX Ïà¶ÔÎĵµµÄˮƽ×ù±ê
event.clientY Ïà¶ÔÎĵµµÄ´¹Ö±×ù±ê
event.offsetX Ïà¶ÔÈÝÆ÷µÄˮƽ×ø±ê
event.offsetY Ïà¶ÔÈÝÆ÷µÄ´¹Ö±×ø±ê
document.documentElement.scrollTop ´¹Ö±·½Ïò¹ö¶¯µÄÖµ
event.clientX+document.documentElement.scrollTop Ïà¶ÔÎĵµµÄˮƽ×ù±ê+´¹Ö±·½Ïò¹ö¶¯µÄÁ¿
---
IE£¬FireFox ²îÒìÈçÏ£º
IE6.0¡¢FF1.06+£º
clientWidth = width + padding
clientHeight = height + padding
offsetWidth = width + padding + border
offsetHeight = height + padding + border
IE5.0/5.5£º
clientWidth = width - border
clientHeight = height - border
offsetWidth = width
offsetHeight = height
(ÐèÒªÌáһϣºCSSÖеÄmarginÊôÐÔ£¬ÓëclientWidth¡¢offsetWidth¡¢clientHeight¡¢offsetHeight¾ùÎÞ¹Ø)
ÍøÒ³¿É¼ûÇøÓò¿í£º document.body.clientWidth
ÍøÒ³¿É¼ûÇøÓò¸ß£º document.body.clientHeight
ÍøÒ³¿É¼ûÇøÓò¿í£º document.body.offsetWidth (°üÀ¨
Ïà¹ØÎĵµ£º
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ͼƬÅÜÂíµÆ</title>
</head>
<body>
<div align="center" id="demo" style="overflow: hidden; height: 33px; width: 400px;
&nb ......
This document is for establishing build standard for JavaScript and CSS compression
The objective for this document is to establish a companywide JavaScript and CSS compression standard that can be shared crossing multiple SharePoint product development projects. This is the first draft
Overview ......
<script language="javascript" type=text/javascript>
var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
function SystemSpecialFolder(Special)
{
var tfolder, TemporaryFolder = Special;//0: Windows ²Ù×÷ϵͳ°²×°µÄÎļþ;1:°üº¬¿â¡¢×ÖÌ壬ÒÔ¼°É豸Çý¶¯³ÌÐòµÄ System Î ......