does anyone have any idea why this function doesn't work????
function chck(ans){
var userin = document.getElementById(ans).value;
if (userin == ans) {
alert("correct!");
}
}
html (written as part of a javascript function):
<form action=\"chck(' "+letters+" ')\"><input type=\"text\" id=\""+letters+"\" value=\"answer here (no caps)\"/>\
<input type=\"submit\"></form>


Reply With Quote
Bookmarks