日期:2014-05-17  浏览次数:20626 次

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>