Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¡·Ñ§Ï°±Ê¼Ç£ºÒ»¡¢Ç°ÑÔ

¡¶Îò͸JavaScript¡·Ñ§Ï°±Ê¼Ç
 
Ô­ÎĵØÖ·£ºhttp://www.cnblogs.com/leadzen/archive/2008/02/25/1073404.html
 
ÕâÊÇÒ»±¾ºÜÐÎÏóÉú¶¯µÄÊ飬ʹÎÒÃÇ¿ÉÒÔ¸üÉîµØÁ˽âÁËJavaScript¡£
 
ÒýÑÔ
 
   ±à³ÌÊÀ½çÀïÖ»´æÔÚÁ½ÖÖ»ù±¾ÔªËØ£¬Ò»¸öÊÇÊý¾Ý£¬Ò»¸öÊÇ´úÂë¡£±à³ÌÊÀ½ç¾ÍÊÇÔÚÊý¾ÝºÍ´úÂëǧ˿ÍòÂƵ ......

JavascriptµÄ³£ÓÃÓï¾ä

1.document.write( " "); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document- >html- >(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window- >(navigator,screen,history,location,document)
5.µÃµ½±íµ¥ÖÐÔªËصÄÃû³ÆºÍÖµ:document.getElementById( "±íµ¥ÖÐÔªËصÄID號 ").name(»òvalue)
6.Ò»¸ö ......

Javascript »ñÈ¡Ò³ÃæÉÏÑ¡ÖеÄÎÄ×Ö

IE¿ÉÒÔµ÷Óãº
 
<script type="text/javascript">
 
// ˵Ã÷£º»ñÈ¡Ò³ÃæÉÏÑ¡ÖеÄÎÄ×Ö
// ÕûÀí£ºhttp://www.CodeBit.cn
 
function getSelectedText() {
    if (window.getSelection) {
        // This technique is the most likel ......

JavaScript³£Ó÷½·¨×ܽᗗһЩº¯Êý

¸ù¾ÝÉí·ÝÖ¤ºÅÂëÈ¡µÃÉúÈÕÓëÐԱ𣬲¢ÅжÏ18λÉí·ÝÖ¤µÄÕýÈ·Óë´íÎó:
function showBirthday(val){
var birthdayValue;
if(15==val.length){//15λÉí·ÝÖ¤ºÅÂë
birthdayValue = val.charAt(6)+val.charAt(7);
if(parseInt(birthdayValue)<10){
birthdayValue = '20'+birthdayValue;
}else{
birthdayValue = '1 ......

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ