This is my page, but my script not work. Why?
Where is the error?
<HTML>
<HEAD>
<title>chek</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script language="Javascript">
function checkpwd() {
if (passwd1.value ==
passwd2.value) {
document.all.music.src='sounds/yes.au'
}
else {
document.all.music.src='sounds/no.wav'
}
}
</script>
</HEAD>
<body bgcolor=bcb49d>
<br><br><br>
<center>
<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>
<bgsound id=music loop=1 autostart="true"> </BODY> </HTML>
Where is the error?
<HTML>
<HEAD>
<title>chek</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script language="Javascript">
function checkpwd() {
if (passwd1.value ==
passwd2.value) {
document.all.music.src='sounds/yes.au'
}
else {
document.all.music.src='sounds/no.wav'
}
}
</script>
</HEAD>
<body bgcolor=bcb49d>
<br><br><br>
<center>
<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>
<bgsound id=music loop=1 autostart="true"> </BODY> </HTML>