I have a code to disable ctrl-v (paste) on the 2nd box. The problem
is that when I type ctrl-v, the text shows, then disappear
after I release ctrl-v. How can I make it not to show in the box. In
VB, I can set keyascii=0 to kill the input. Is there a similar way to
do it in JavaScript? Thanks a lot.
<HTML><head></head><body>
<form name="myForm">
Password: <input type="text"><br >
Comfirm: <input type="text" name="myText"
onKeyUp = "fncKeyStop();" > </form>
<script>
function fncKeyStop(){
if (window.event.c trlKey){
if (window.event.k eyCode == 86) {
document.myForm .myText.value = ""
}
}}
</script></body></HTML>
Chris
is that when I type ctrl-v, the text shows, then disappear
after I release ctrl-v. How can I make it not to show in the box. In
VB, I can set keyascii=0 to kill the input. Is there a similar way to
do it in JavaScript? Thanks a lot.
<HTML><head></head><body>
<form name="myForm">
Password: <input type="text"><br >
Comfirm: <input type="text" name="myText"
onKeyUp = "fncKeyStop();" > </form>
<script>
function fncKeyStop(){
if (window.event.c trlKey){
if (window.event.k eyCode == 86) {
document.myForm .myText.value = ""
}
}}
</script></body></HTML>
Chris
Comment