怎样让密码控件的密码不能粘贴? 要做一个用户注册页面,为了安全,我想让用户在填写密码的时候不能将其他地方的密码复制粘贴到我的密码控件(TextBox)里,应该怎么才能做到呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以在文本框中写:onpaste="return false"javascript:<html><head><script type="text/javascript">function KeyDown(){ if ((window.event.ctrlKey)&& ((window.event.keyCode==99)|| (window.event.keyCode==118))){ alert("禁止复制粘贴!"); event.returnValue=false; } }</script></head><body onmousedown="KeyDown()"> <p>Click somewhere in the document.An alert box will tell you if you pressed the CTRL key or not.</p></body></html> 网上搜到的 我也没试过 <asp:TextBox id="Pwd" Type="Password" runat=server" onpaste="return false" /> AutoCompleteExtender问题 在页面中调用自定义类中的方法时错误,无法弹出提醒的窗口 求GridView最后一页行数小于设置的PageSize处理方法 大文件上传示例程序有些BUG 100万条记录的查询问题,查询超时,寻求最佳方案 怎么设置所有某个指定控件的初始值? 动态载入用户控件,但控件内的事件都得不到执行? 对于duwamish 7.0的一些问题 请问为什么在有的机器上浏览页面很正常. 在Gridview中添加新的linkbutton而不触发rowcommand事件 如何从String转换为数据库的bit型? 关于事件不在后台生成代码的问题
<html>
<head>
<script type="text/javascript">
function KeyDown(){
if ((window.event.ctrlKey)&&
((window.event.keyCode==99)||
(window.event.keyCode==118))){
alert("禁止复制粘贴!");
event.returnValue=false;
}
}
</script>
</head>
<body onmousedown="KeyDown()">
<p>Click somewhere in the document.
An alert box will tell you if you
pressed the CTRL key or not.</p>
</body>
</html>
网上搜到的 我也没试过