Hello, I have an html5 form, I want to validate it and when clicking on submit, it calls the function register.
The way i done it below is not working. Can you please help me? I think i should do it with javascript but i dont know exactly.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Required Demo</title>
</head>
<body>
<form>
<label>
First Name:
<input required title="First Name is Required!" />
</label>
<label>
Last Name:
<input required title="Last Name is Required!" />
</label>
<input type="submit" value="Submit" onclick= "register()"/>
</form>
</body>
</html>