本文发表在 rolia.net 枫下论坛<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" type="text/css" href="http://rnd/rnd/css/style1.css">
<script language="vbscript">
function validate(int b)
a=trim(document.form1.RCvalue.value)
if a="" or (not isnumeric(a)) then
alert("Please enter a value.")
document.form1.RCvalue.focus()
elseif a<0.1 and b=0 then
alert("Value should greater than 0.1")
document.form1.RCvalue.focus()
elseif a>=1000 and b=0 then
alert("Value should less than 1000")
document.form1.RCvalue.focus()
else
if b=1 then
a=trim(document.form1.voltage.value )
if a="" or not isnumeric(a) then
alert("Please enter a voltage.")
document.form1.voltage.focus()
elseif
document.form1.submit()
end if
else
document.form1.submit()
end if
end if
end function
</script>
</HEAD>
<body onload="javascript:{if(parent.frames[0]&&parent.frames['Top'].Go)parent.frames['Top'].Go();document.form1.RCvalue.focus()}">
<center>
<form action="smadd2.asp?no1=311&type=R1" method="post" name=form1 id=form1>
<H3>
Step 2: New type for 311(SMD Single Resistors)</h3>
<table width=60% border=1>
<tr><th>Value(Ohm)</th><td><input id=RCvalue name=RCvalue size=4 maxlength=4>
<select id=unit name=unit>
<option value=1> </option>
<option value=2>K</option>
<option value=3>M</option>
</select>Ohms</td></tr>
<tr><th>Accurency(%)</th>
<td><input type=radio checked id=accur name=accur value=1>1%
<input type=radio id=accur name=accur value=2>2%
<input type=radio id=accur name=accur value=5>5%
<input type=radio id=accur name=accur value=10>10%
</td></tr>
<tr><th>Package</th><td>
<select id=pack name=pack>
<option value="03Resistor 0402">Resistor 0402 </option>
<option value="01Resistor 0603">Resistor 0603 </option>
<option value="02Resistor 0805">Resistor 0805 </option>
</select></td></tr>
</table>
<br>
<input type=button value=" Add " onclick="validate(0)" id=button2 name=button2>
</form>
</center>
</BODY>
</HTML>更多精彩文章及讨论,请光临枫下论坛 rolia.net
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" type="text/css" href="http://rnd/rnd/css/style1.css">
<script language="vbscript">
function validate(int b)
a=trim(document.form1.RCvalue.value)
if a="" or (not isnumeric(a)) then
alert("Please enter a value.")
document.form1.RCvalue.focus()
elseif a<0.1 and b=0 then
alert("Value should greater than 0.1")
document.form1.RCvalue.focus()
elseif a>=1000 and b=0 then
alert("Value should less than 1000")
document.form1.RCvalue.focus()
else
if b=1 then
a=trim(document.form1.voltage.value )
if a="" or not isnumeric(a) then
alert("Please enter a voltage.")
document.form1.voltage.focus()
elseif
document.form1.submit()
end if
else
document.form1.submit()
end if
end if
end function
</script>
</HEAD>
<body onload="javascript:{if(parent.frames[0]&&parent.frames['Top'].Go)parent.frames['Top'].Go();document.form1.RCvalue.focus()}">
<center>
<form action="smadd2.asp?no1=311&type=R1" method="post" name=form1 id=form1>
<H3>
Step 2: New type for 311(SMD Single Resistors)</h3>
<table width=60% border=1>
<tr><th>Value(Ohm)</th><td><input id=RCvalue name=RCvalue size=4 maxlength=4>
<select id=unit name=unit>
<option value=1> </option>
<option value=2>K</option>
<option value=3>M</option>
</select>Ohms</td></tr>
<tr><th>Accurency(%)</th>
<td><input type=radio checked id=accur name=accur value=1>1%
<input type=radio id=accur name=accur value=2>2%
<input type=radio id=accur name=accur value=5>5%
<input type=radio id=accur name=accur value=10>10%
</td></tr>
<tr><th>Package</th><td>
<select id=pack name=pack>
<option value="03Resistor 0402">Resistor 0402 </option>
<option value="01Resistor 0603">Resistor 0603 </option>
<option value="02Resistor 0805">Resistor 0805 </option>
</select></td></tr>
</table>
<br>
<input type=button value=" Add " onclick="validate(0)" id=button2 name=button2>
</form>
</center>
</BODY>
</HTML>更多精彩文章及讨论,请光临枫下论坛 rolia.net