document.viewport.getHeight()返回为0
来源:互联网 发布:淘宝 评价 期限 编辑:程序博客网 时间:2024/06/05 09:00
document.viewport.getHeight()返回为0
使用prototype的document.viewport.getHeight()始终返回为0,不解。终于在一个国外的论坛上找到一个答案:
Turns out you need a correct DOCTYPE to make it work properly, otherwise Prototype will be in "quirks mode" which doesn't let getheight() work as intended.
Problem solved, then. Now time to wait 48 hours >_>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Turns out you need a correct DOCTYPE to make it work properly, otherwise Prototype will be in "quirks mode" which doesn't let getheight() work as intended.
Problem solved, then. Now time to wait 48 hours >_>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- document.viewport.getHeight()返回为0
- Android getheight() 得到返回值为0
- getWidth() getHeight() ,返回的值为0
- android getWidth() getHeight() 方法返回的值为0
- 解决android getWidth() getHeight() 方法返回的值为0的方法
- 为何 view.getWidth和view.getHeight 的返回值为0
- 关于View的getHeight()值为0
- document.body.clientHeight返回值为0的解决方案
- 使用View的getWidth(),getHeight()方法返回0的问题
- Android : View.getWidth() 和 view.getHeight() 返回0
- android自定义View中getWidth和getHeight返回0
- 为什么View中的getWidth()和getHeight()值为0
- android view getWidth 和 getHeight 的值为0
- android view getWidth 和 getHeight 的值为0
- getActionbar().getHeight()为0,actionbar customView失效的解决方法
- getx,gety,getwidth,getheight获取控件大小,高度为0
- android view getWidth 和 getHeight 的值为0
- View的getWidth,getHeight为0的解决方法
- [张龙老师Java课程笔记]Java SE第二课 原生数据类型
- FCKeditor 文本编辑器非空验证
- 白手起家:一步一步安装 hadoop on windows
- windows 编程基础
- 有这样一些故事。。。
- document.viewport.getHeight()返回为0
- 恐慌
- :nth-child选择器
- 生产者消费者模型与双缓冲队列
- c# 导出EXCEL
- Java 注解编程
- 烦人的java.util.concurrent锁
- TD分布式基站技术探讨
- 关于界面底侧或者左右侧出侧一条空白(statusbar的高度问题) 20 pixel blank at bottom of screen