js在IE和firefox中不同.docVIP

  • 1
  • 0
  • 约9.39千字
  • 约 6页
  • 2017-07-06 发布于河南
  • 举报
js在IE和firefox中不同

js在IE和firefox中的不同 (2009-05-18 16:12:52) 1.firefox不能对innerText支持。 firefox支持innerHTML但却不支持innerText,它支持textContent来实现innerText,不过默认把多余的空格也保留了。如果不用textContent,如果字符串里面不包含HTML代码也可以用innerHTML代替。 2.禁止选取网页内容: 在IE中一般用js:obj.onselectstart=function(){return false;} 而firefox用CSS:-moz-user-select:none 3.滤镜的支持(例:透明滤镜): IE:filter:alpha(opacity=10); firefox:-moz-opacity:.10; 4.捕获事件: IE:obj.setCapture() 、obj.releaseCapture() Firefox: document.addEventListener(mousemove,mousemovefunction,true); document.removeEventListener(mousemove,mousemovefunction,true); 5.获取鼠标位置: IE:event.clientX、event.clientY firefox:

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档