posts - 28,  comments - 13,  trackbacks - 0
这里有一个例子,是打开和一个图象大小的窗口,随图象大小任意变化,你可以相似发挥。要看更多的请到   http://elove.heha.net  
   
  <SCRIPT   LANGUAGE="JavaScript">  
  var   isNav4,   isIE4;  
  if   (parseInt(navigator.appVersion.charAt(0))   >=   4)   {  
  isNav4   =   (navigator.appName   ==   "Netscape")   ?   1   :   0;  
  isIE4   =   (navigator.appName.indexOf("Microsoft")   !=   -1)   ?   1   :   0;  
  }  
  function   fitWindowSize()   {  
  if   (isNav4)   {  
  window.innerWidth   =   document.layers[0].document.images[0].width;  
  window.innerHeight   =   document.layers[0].document.images[0].height;  
  }  
  if   (isIE4)   {  
  window.resizeTo(500,   500);  
  width   =   500   -   (document.body.clientWidth   -     document.images[0].width);  
  height   =   500   -   (document.body.clientHeight   -     document.images[0].height);  
  window.resizeTo(width,   height);  
        }  
  }  
  </script>
posted on 2007-06-14 16:26 Lib 阅读(539) 评论(0)  编辑  收藏 所属分类: 网页特效

只有注册用户登录后才能发表评论。


网站导航:
 
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011



我的JavaEye博客
http://lib.javaeye.com


常用链接

留言簿(2)

随笔分类

文章分类

FLASH

Java

搜索

  •  

最新评论

阅读排行榜

评论排行榜