document.getElementById(id).value的问题 [英] Problem with document.getElementById(id).value

查看:222
本文介绍了document.getElementById(id).value的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释为什么以下在IE5中有效,但不是FF3吗?


提前致谢!

Could someone please explain why the following works in IE5, but not FF3?

Thanks in advance!

展开 | 选择 | Wrap | 行号

推荐答案

HTMLTableCellElement中没有value属性(即使你定义了一个value属性)


PS :查看 HTML验证服务
there is no value property in HTMLTableCellElement (even if you define a value attribute)

PS: check out the HTML Validation service


请注意,ID不能(或不应该)以数字开头 - 请参阅链接
Also note that IDs cannot (or should not) start with a number - see link.


@acoder


浏览器非常宽容*。但是,当然,该文件将无效。


*自己测试
@acoder
browsers are quite forgiving*. though, of course, the document will be invalid then.

* tested it myself


这篇关于document.getElementById(id).value的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆