<script type="text/javascript">/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************///form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]omitformtags=omitformtags.join("|")function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}function reEnable(){
return true
}if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}</script>
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************///form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]omitformtags=omitformtags.join("|")function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}function reEnable(){
return true
}if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}</script>
解决方案 »
- javascript 浏览器最大化触发事件
- javascript 急问题在线=着处理
- 一道有难度的JS面试题,求大侠们帮忙解答T_T...
- 高手帮我看看啊 我写的哪里有问题, 为什么运行脚本呢?
- 菜鸟问题:当点击引用时,焦点自动跳到回复输入框?界面下拉,如何实现,我知道锚的原理,但是在此不适用.
- javasrcipt获取客户端的信息
- 如何在功能不变的前提下,把一个图片设为按钮,按下实现原来普通按钮的功能!
- applet与javascript通信的问题,望高手指点!
- 如何用Javascript关闭另一个窗口?(分数只加给第一个答对者)
- webpack 采用html-webpack-plugin生成的html,通过script src关联相应的js,但却404,可是这个js文件明明存在的
- 怎样使得下拉框的项被点选时不会变为蓝底白字?
- 上传图片时用javascript判断文件名不能包含中文和空格?
-moz-user-select
样式做