Document.getElementbyID在Firefox中不起作用 [英] Document.getElementbyID not working in Firefox

查看:132
本文介绍了Document.getElementbyID在Firefox中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网格视图中添加了一个单选按钮

然后在单选按钮上添加了一些属性

现在我正在尝试使用java脚本访问这些属性


IE8中的b $ b代码

Document.getElementbyid(objID).parentNode.srno



这在Firefox中不起作用





< input id =gvEstablishment_ctl02_rdoEdittype =radio name =gvEstablishment $ ctl02 $ rdoEditvalue =rdoEditönclick=javascript:return CheckOnlyOne(this.id); />









请帮助。 ..



只有复选框和单选按钮有这​​样的问题

i have added a radio button in grid view
then added some attributes to the radio button
and now am trying to access those attributes using java script

code in IE8
Document.getElementbyid(objID).parentNode.srno

which is not working in Firefox


<input id="gvEstablishment_ctl02_rdoEdit" type="radio" name="gvEstablishment$ctl02$rdoEdit" value="rdoEdit" önclick="javascript:return CheckOnlyOne(this.id);" />




please help...

only checkbox and radio button have such prob

推荐答案

ctl02


rdoEditvalue =rdoEditönclick=javascript:return CheckOnlyOne(this.id);/>



< br $>




请帮忙...



只有复选框和单选按钮这样的概率
rdoEdit" value="rdoEdit" önclick="javascript:return CheckOnlyOne(this.id);" />




please help...

only checkbox and radio button have such prob


错误的陈述。如果你的意思是 document.getElementById ,那么确实有效。你有什么写作不应该在任何地方工作。语言区分大小写。请参阅:

http:// www.w3schools.com/js/js_statements.asp [ ^ ]。



-SA
Wrong statement. It does work, if you mean document.getElementById. What you have written should not work anywhere. The language is case-sensitive. Please see:
http://www.w3schools.com/js/js_statements.asp[^].

—SA


这篇关于Document.getElementbyID在Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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