Consider the following screen shot Write HTML code lo displa
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>

