Create a form, using HTML, for admission to a University. The form should ask for the following information: Your email id as user name (it should be of the type xxxx@abc.in) A pin chosen by you (should have a minimum size of 4 decimal digits) Name of the Student City in which student is residing (You should create a drop-down list of about 4 to 6 cities for selection of City, default value for City should be Mumbai) Select from the options Yes/No for the question Mathematics at 10+2? The form should include a SUBMIT button.
<html>
<head>
<title>Admission to a University</title>
</head>
<body>
<form>
<input type="email" placeholder="Email"/>
<input type="number" min_length="3" placeholder="Pin"/>
<input type="name" placeholder="Number"/>
<input type="city" placeholder="City"/>
<select>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<input onsubmit="onSubmit()">Sumbit</input>
</form>
<script>
function onSubmit() {
// implementation
}
<script>
</body>
</html>
Comments
Leave a comment