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

javascript»ñÈ¡ÍøÒ³¸ß¶ÈÓë¿í¶È

ÐèÒªÒýÈëjquery-1.3.2.js
»ñÈ¡¿í¶È
function getCurrentWidth(){
 var currentWidth = 0;
 // handle IE 6
 if ($.browser.msie && $.browser.version < 7) {
  var scrollWidth = Math.max(
   document.documentElement.scrollWidth,
   document.body.scrollWidth
  );
  var offsetWidth = Math.max(
   document.documentElement.offsetWidth,
   document.body.offsetWidth
  );
  if (scrollWidth < offsetWidth) {
   currentWidth = $(window).width();
  } else {
   currentWidth =  scrollWidth;
  }
 // handle "good" browsers
 } else {
  currentWidth = $(document).width();
 }
 return currentWidth;
}
»ñÈ¡¸ß¶È
function getCurrentHeight(){
 var currentHeight = 0;
 // handle IE 6
 if ($.browser.msie && $.browser.version < 7) {
  var scrollHeight = Math.max(
   document.documentElement.scrollHeight,
   document.body.scrollHeight
  );
  var offsetHeight = Math.max(
   document.documentElement.offsetHeight,
   document.body.offsetHeight
  );
  if (scrollHeight < offsetHeight) {
   currentHeight = $(window).height();
  } else {
   currentHeight = scrollHeight;
  }
 // handle "good" browsers
 } else {
  currentHeight = $(document).height();
 }
 currentHeight = $(window).height();
 return currentHeight;
}


Ïà¹ØÎĵµ£º

JavaScript constructorÊôÐÔ

Definition and Usage
¶¨ÒåÓëÓ÷¨The constructor property is a reference to the function that created an object.
constructorÊôÐÔÊÇËù½¨Á¢¶ÔÏóµÄº¯Êý²Î¿¼Syntax
Óï·¨object.constructor
Example 1
¾ÙÀý
In this example we will show how to use the constructor property:
ÔÚÕâ¸ö¾ÙÀýÖÐÎÒÃǽ«Õ¹Ê¾ÈçºÎʹÓÃcons ......

JavaScript³£Ó÷½·¨×Ü½á——ÍøÒ³³£ÓÃС¼¼ÇÉ

ÍøÒ³³£ÓÃС¼¼ÇÉ
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return fa ......

JavaScript³£Ó÷½·¨×ܽᗗÅжÏä¯ÀÀÆ÷ÀàÐÍ

ÅжÏä¯ÀÀÆ÷ÀàÐÍ
<SCRIPT language=javascript>
if(navigator.appVersion.indexOf("MSIE 6.") != -1 ){
window.location = "111.htm" ;
}
</SCRIPT>
°´Å¥±³¾°Í¼Æ¬Ìæ»»
<input type=button style="background-image:url(a.gif)" value=test onmouseover="this.style.backgroundImage='url(b.gif ......

JavaScript³£Ó÷½·¨×ܽᗗÀûÓýű¾·â×°

ÀûÓýű¾·â×°£¬·½±ãʵÏÖÍøÕ¾Ðü¸¡¹ã¸æ
ÏÂÃæÊÇJS½Å±¾(floatdiv.js)
/*======================================================================
¸¡¶¯¿éÖ§³Ö½Å±¾
DESIGN BY : Åí¹ú»Ô
DATE: 2004-02-26
SITE: http://kacarton.yeah.net/
BLOG: http://blog.csdn.net/nhconch
EMAIL: kacarton@sohu.com
ÎÄÕÂÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ