我正在使用 javascript 来禁用我的网站上的文本选择。
密码是:
<script type="text/JavaScript">
function disableselect(e) {
return false
}
function reEnable() {
return true
}
document.onselectstart = new Function ("return false")
if (window.sidebar) {
document.onmousedown = disableselect
document.onclick = reEnable
}
</script>
类似的脚本可以找到 给你
在我的本地主机上: 所有的浏览器(Firefox,Chrome,IE 和 Safari)都很好用。
在我的 Live 站点上: 除了 Firefox 之外,一切都很好。
我的问题是:
有没有人对为什么 Firefox 在实时站点和本地主机上的表现不同有什么建议。注意: 已启用 Javascript。
也许我的脚本过于简单,所以我已经尝试了 跟随与完全相同的结果