Consider the following screen shot Write HTML code lo displa

Consider the following screen shot: Write HTML code lo display the above form. You must have ALL the fields as shown above appear on your form, formatted as above But. you may have the \'Save\' and \'Main Menu\' buttons in the above form labeled \'Submit\' and \'Reset\' in the form you create. The \'action\' attribute of the form should be left empty. But when the form is submitted. JavaScript function(s) should be invoked to do the following validations: The \'Item Type Name\' field can contain only upper- and lower-case letters, digits from 0-9. blanks and period(s) (i.e.. the character in any order. However, the value entered must not begin with a period

Solution

<!DOCTYPE html>
<html>
<title>Web Page Design</title>
<head>
<center><h3>ADD AN INVENTORY ITEM TYPE</h3></center>
<style>
body{
background-color:lightblue;
}
</style>
</head>
<body>
<form name=\"form1\" action=\"\" method=\"get\">
<center>
<table border=\'0\'>
<tr>
<td>
Item Type Name:
</td>
<td>
<input type=\"text\" name=\"itn\" length=25/>
</td>
<td>
Barcode Prefix:
</td>
<td>
<input type=\"text\" length=25/>
</td>
</tr>
<tr>
<td>
Units:
</td>
<td>
<input type=\"text\" length=25/>
</td>
<td>
Units Measure:
</td>
<td>
<input type=\"text\" length=25/>
</td>
</tr>
<tr>
<td>
Reorder Point:
</td>
<td>
<input type=\"text\" length=25/>
</td>
</tr>
<tr>
<td>
Age Sensitive:
</td>
<td>
<input type=\"radio\" value=\"yes\"/>Yes
<input type=\"radio\" value=\"no\"/>No
</td>
</tr>
<tr>
<td>
Validity Days:
</td>
<td>
<input type=\"text\" length=25 value=-1 />
</td>
</tr>
<tr>
<td>
Notes:
</td>
<td>
<textarea rows=\"7\" cols=\"25\"></textarea>
</td>
</tr>
</table>
<button type=\"button\" value=\"save\" onclick=\"restrict()\">SUBMIT</button>
<p id=\"demo\"></p>
<script type=\"text/javascript\">
function restrict(){
var b1=document.getElementById(\"itn\").value;
var b11=/^[a-zA-Z0-9._ ]*$/;
if(b1===\' \'){
alert(\"please fill in all the details..!!!\");
return false;
}
else if(b1.match(b11)){
alert(\"Successful...correct details\");
}
else{
return true;
}
}
}
</script>
<button type=\"button\" value=\"reset\">RESET</button>
</center>
</background>
</form>
</body>
</html>

 Consider the following screen shot: Write HTML code lo display the above form. You must have ALL the fields as shown above appear on your form, formatted as ab
 Consider the following screen shot: Write HTML code lo display the above form. You must have ALL the fields as shown above appear on your form, formatted as ab

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site