radiobuttons显示/隐藏div IE [英] radiobuttons show/hide divs IE

查看:67
本文介绍了radiobuttons显示/隐藏div IE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有,


我在IE中显示和隐藏div的单选按钮有问题。我无法弄清问题是什么。当我点击radiobutton没有任何变化。只有当我点击其他地方时,它才会改变。有人可以告诉我如何立即更改它。


这是我的html示例:

hey all,

i have a problem with radio buttons showing and hiding divs in IE. i can''t figure out what the problem is. when i click on the radiobutton nothing changes. it''s only when i click somewhere else, it changes. can someone tell me how i can change it instantly.

here is a my html sample:

展开 | 选择 | 换行 | 行号

推荐答案

那是因为你正在使用onchange。改为使用onclick。
That''s because you''re using onchange. Use onclick instead.


我也是这么想的,我已经尝试过了。它给出了同样的问题。似乎IE只在onclick-和onchange-event之后更改了检查值。
i thought so too therefor i tried it already. and it gives the same problem. it seems like IE only changes the checked value after the onclick- and onchange-event.


我使用onclick在IE6 / 7中测试了你的代码,它运行正常。
I tested your code in IE6/7 using onclick and it worked fine.


这篇关于radiobuttons显示/隐藏div IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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