I am validating forms in JavaScript, and It's just not working. I have tried to figure it out myself, but I can't. The spaces between the forms are where the break tags are.
<form name = "check" >
First Name*:
<input type="text" name="First Name" maxlength="15"/>
Last Name*:
<input type="text" name="Last Name" maxlength="15"/>
Email*:
<input type="text" name="Email"/>
Contact Number:
<input type="text" name="contact number"/>
Message*:
<textarea name="Enquiries" rows="10" cols="50">
</textarea>
<input type="checkbox" name="pricing"> I would like to find out the pricing of a particular painting.</input>
<input type="checkbox"> I am asking a question.</input>
<input type="submit" name="Send" onClick = "check()"/>
</form>
<script type = "text/javscript">
function check(){
if(document.check.pricing.checked){
alert("OIIIIIII!");
}
else{
alert("not checked");
}
}
</script>
P.S.
If you know any good places to learn Javascript, please post them with your answer