专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 跨浏览器开发

Firefox contentEditable="true" 无法选中checkbox!这到底什么原因?很抓狂-

发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
Firefox contentEditable="true" 无法选中checkbox!!这到底什么原因??很抓狂--在线等!
本帖最后由 Zhou_Andy 于 2013-02-28 16:10:06 编辑
<html>
<head><title>Firefox contentEditable="true" 无法选中checkbox!!!!!</title></head>
<body contentEditable="true" onload="document.designmode='on'">
<input type="checkbox" name="test">无法选中???</input>
</body>
</html>


Firefox 19.0 版本中,无法选中checkbox;但是其他浏览器都可以选中!!!
这到底什么原因??很抓狂

有没有方法实现选中效果。
谢谢!!
firefox

------解决方案--------------------
你加contentEditable干嘛呢?firefox4也没搞。。点击到对象上事件都没触发。。

<html>
<head><title>Firefox contentEditable="true" 无法选中checkbox!!!!!</title></head>
<body contentEditable="true" onload="document.designmode='on'">
<input type="checkbox" name="test">无法选中???</input>
</body>
</html>
<script>
    document.body.onmousedown = function (e) {
        var o = e.target;
        alert(o)//点击到checkbox都没想要mousedown事件
    }
</script>
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: