📄 mod1.html
字号:
<html>
<head><title>Modifying A Record</title>
<SCRIPT LANGUAGE=javascript>
function msg2()
{
var a=new RegExp();
var b=new RegExp();
var c=new RegExp();
var d=new RegExp();
var f=new RegExp();
var RE2=new RegExp();
RE2=/(^\d{10}$)/
a=/^([a-z]+)$/i
b=/^([a-z]+)$/i
c=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/i
d=/^([0-9]+)$/i
f=/^([a-z]+[0-9]*[@][a-z]+[.][a-z]+)$/i
if(!a.test(document.d.fn.value)||!a.test(document.d.mn.value)||!a.test(document.d.ln.value)||!a.test(document.d.ct.value)||!a.test(document.d.a.value)||!RE2.test(document.d.m.value)||!f.test(document.d.em.value)||!b.test(document.d.di.value))
{
alert("Please enter correct information.");
if(!a.test(document.d.fn.value))
{
document.d.fn.style.borderColor="red"
}
else
{
document.d.fn.style.borderColor =""
}
if(!a.test(document.d.mn.value))
{
document.d.mn.style.borderColor ="red"
}
else
{
document.d.mn.style.borderColor =""
}
if(!a.test(document.d.ln.value))
{
document.d.ln.style.borderColor="red"
}
else
{
document.d.ln.style.borderColor =""
}
if(!a.test(document.d.ct.value))
{
document.d.ct.style.borderColor="red"
}
else
{
document.d.ct.style.borderColor =""
}
if(!a.test(document.d.a.value))
{
document.d.a.style.borderColor="red"
}
else
{
document.d.a.style.borderColor =""
}
if(!RE2.test(document.d.m.value))
{
document.d.m.style.borderColor="red"
}
else
{
document.d.m.style.borderColor =""
}
if(!f.test(document.d.em.value))
{
document.d.em.style.borderColor="red"
}
else
{
document.d.em.style.borderColor =""
}
if(!b.test(document.d.di.value))
{
document.d.di.style.borderColor="red"
}
else
{
document.d.di.style.borderColor =""
}
return false;
}
else
{
return true;
}
}
</script>
</head>
<body>
<form name=d method=post action=myasp1.asp onsubmit="return msg2()">
<center><tr><td><b><font size=3>Dealer ID:</font></b></td>
<td><input name="di"></td></tr></center>
<br><br>
<center><tr><td><b><font size=3>First Name:</font></b></td>
<td><input name="fn"></td></tr></center>
<br><br>
<center><tr><td><b><font size=3>Middle Name:</font></b></td>
<td><input name="mn"></td></tr></center>
<br><br>
<center><tr><td><b><font size=3>Last Name:</font></b></td>
<td><input name="ln"></td></tr></center>
<br><br>
<center><tr><td><b><font size=3>City:</font></b></td>
<td><input name="ct"></td></tr></center>
<br><br>
<center><tr><b><font size=3>Address:</font></b>
<textarea name="a"></textarea></tr></center>
<br><br>
<center><tr><td><b><font size=3>Mobile number:</font></b></td>
<td><input name="m"></td></tr></center>
<br><br>
<center><tr><td><b><font size=3>Altername EMAIL:</font></b></td>
<td><input name="em"></td></tr></center>
<br><br>
<td>
<fieldset><legend>Dealer Information</legend>
<!-- Select List--->
<p>
<label for="finfo"><font color="green">Information about Dealer<br>
Supply.....</font></label><br>
<select name="fsize" id="finfo">
<option id="seeds">seeds</option>
<option id="pesticides">pesticides</option>
<option id="insecticides">insecticides</option>
<option id="Fertilizer">Fertilizer</option>
<option id="Pumps">Pumps</option>
<option id="FarmHandTool">FarmHandTool</option>
</select>
</p>
<p>
<label for="firm"><font color="skylovender">Amount of Quantity<br>
Supply<font color="red"> Quantity</font></font></label><br>
<select name="firr" id="firm"><!--multiple="multiple" size="4"-->
<option id="100">100</option>
<option id="200">200</option>
<option id="300">300</option>
<option id="400">400</option>
<option id="500">500</option>
<option id="600">600</option>
</select>
</p>
</fieldset>
</td>
<center><input name=submit type=submit value="update"></center>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -