安装了VS2005中的进来看看

Oldman 2005-12-26 03:31:32
各位如果安装了VS2005的话,请在客户端运行一下下面的这个语句,看看是什么结果:

alert(window.document.body.clientHeight+'\n'+window.document.body.clientWidth);

我这边运行的结果是在没有框架时:19,772,在有框架的界面下:0,192
两个结果的宽度好象是没有问题的,前面那个高度是不是有点问题?

在VS2002/VS2003下面,上面运行的结果基本是高度500以上(600X800),宽度770以上。

不知是不是我的机器装的有问题,还是MS的BUG?

麻烦各位在你们的VS2005环境下,看看上面这段代码的运行结果。
...全文
707 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
Oldman 2006-02-13
  • 打赏
  • 举报
回复
用这个document.documentElement.clientWidth还是可以,只是要改很多代码
Lukiya 2006-02-02
  • 打赏
  • 举报
回复
fgcsh(凡人)的应该有用
cm8983 2006-01-31
  • 打赏
  • 举报
回复
mark
daisi 2006-01-11
  • 打赏
  • 举报
回复
应该给VS2005没有关系
fgcsh 2006-01-01
  • 打赏
  • 举报
回复
页面文件中的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


删掉看看
Oldman 2005-12-27
  • 打赏
  • 举报
回复
我用的是英文专业版。
mextb1860 2005-12-26
  • 打赏
  • 举报
回复
你用的是中文正式版的吗?哪里有下吗
vivianfdlpw 2005-12-26
  • 打赏
  • 举报
回复
As of Internet Explorer 6, when you use the !DOCTYPE declaration to specify standards-compliant mode, the body object can obtain its size from its content, or you can set its size explicitly—like a div object, for example. In standards-compliant mode, the html element represents the entire surface onto which a document's contents can be rendered. When the !DOCTYPE declaration does not specify standards-compliant mode, and with earler versions of Internet Explorer, the body object represents the entire surface onto which a document's contents can be rendered. The size of the body object cannot be changed and is equal to the size of the window. Margins you set on this object are rendered inside the border and scrollbars of the object.
lnwuyaowei 2005-12-26
  • 打赏
  • 举报
回复
关注。
qwertxp 2005-12-26
  • 打赏
  • 举报
回复
这个方法不同浏览器解释出来的大小不一样。使用以下方法:
document.documentElement.clientWidth
eflea 2005-12-26
  • 打赏
  • 举报
回复
这个和VS2005没有关系吧,应该是浏览器解释js的问题

62,072

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧