网页禁止右键
oncontextmenu='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' 将以上代码放入需要禁止右键的区域,如…
oncontextmenu='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' 将以上代码放入需要禁止右键的区域,如…
CSS部分: <style> .backToTop{display:none; width:18px; line-height:1.2; padding:5px 0; background-color:#000; color:#fff; font-size:12px; text-align:center; position:fi…
最近用到页面图片缩放,在网上查了下相关的资料,感觉都不好使,不好用,没性能,于是自己亲自写了个,其中第一个判断用于检测图片是否存在,以至于脚本不会出错。 <script type="text/javascript"> //<![CDATA[ function DrawImage(ImgD,iwidth,iheight){ …
第一种方法:提交按钮前最后的文本框里加上 onkeydown="if (event.keyCode==13) document.all.btn.onclick();" 这段代码就行了 其中btn 是提交按钮的id。第二种方法:  …
$("#responsediv") 是个Jquery对象,它Val()是对Value属性赋值对它无意义,Jquery没有innerHTML这个属性,应该这样写$("#responsediv")[0].innerHTML=msg 就可以获得这个Dom对象使用innerHTML。