IE inline edit how to make hidden element actually hide
Posted on 2011-06-10 15:09 a-peng 阅读(348) 评论(0) 编辑 收藏 举报当给div加contenteditable="true"来实现inline edit时,在ie下display: none与visibility: hidden的元素会显示出来(这是ie的默认行为),我们可以通过以下脚本修复。
<script type="text/javascript"> window.document.execCommand('RespectVisibilityInDesign', true, true); </script>
具体可参看:http://msdn.microsoft.com/en-us/library/aa770023%28VS.85%29.aspx