Hello,
first sorry for my english.
I need for help. This is my page
with javascript. I want, when I press
the button enter on the keyboard, to
activate function checkpwd().
Is this possible?
<HTML>
<HEAD>
<title>chek</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script language="Javascript">
function checkpwd() {
if (passForm.passwd1.value ==
passForm.passwd2.value) {
document.getElementById("music").src='sounds/yes.wav'
}
else {
document.getElementById("music").src='sounds/s2.wav'
}
}
</script>
</HEAD>
<body bgcolor=bcb49d>
<br><br><br>
<center>
<form name="passForm">
<textarea name="passwd1" rows=4 cols=35 wrap=auto>
</textarea>
<br>
<textarea name="passwd2" rows=4 cols=35 wrap=auto>
</textarea>
<br>
<Button OnClick="checkpwd()" style="color:000000;background:7f7060">chek</button>
</form>
<bgsound id=music loop=1 autostart="true"> </BODY> </HTML>
first sorry for my english.
I need for help. This is my page
with javascript. I want, when I press
the button enter on the keyboard, to
activate function checkpwd().
Is this possible?
<HTML>
<HEAD>
<title>chek</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script language="Javascript">
function checkpwd() {
if (passForm.passwd1.value ==
passForm.passwd2.value) {
document.getElementById("music").src='sounds/yes.wav'
}
else {
document.getElementById("music").src='sounds/s2.wav'
}
}
</script>
</HEAD>
<body bgcolor=bcb49d>
<br><br><br>
<center>
<form name="passForm">
<textarea name="passwd1" rows=4 cols=35 wrap=auto>
</textarea>
<br>
<textarea name="passwd2" rows=4 cols=35 wrap=auto>
</textarea>
<br>
<Button OnClick="checkpwd()" style="color:000000;background:7f7060">chek</button>
</form>
<bgsound id=music loop=1 autostart="true"> </BODY> </HTML>