Code đổi đơn vị khá hay
Hôm nay Thủ thuật blog Violet post tặng các bạn code đổi đơn vị rất hay để đưa vào
blog
Demo tại đây
Code
<SCRIPT language="JavaScript"
src=" /><BODY>
<CENTER>
<TABLE BORDER=1 WIDTH=486>
<TR><TD COLSPAN=9 ALIGN=CENTER><FORM NAME="isnform01">
<p><b><font face="Tahoma" color="#0000FF">Đổi đơn
vị độ dài</font></b></p>
</TD></TR>
<TR><TD COLSPAN=9 VALIGN=TOP>
<p align="center"><b><font face="Tahoma">Gõ số </font></b><font
face="Tahoma">
<INPUT TYPE="text" NAME="leninp" SIZE=30 VALUE=""
onChange="lenCon();"></font><font face="Tahoma"
SIZE="1"><BR> </font></TD></TR>
<TR><TD ALIGN=CENTER><FONT COLOR="red"
face="Tahoma"><B>Đổi từ:</B></FONT></TD>
<TD ALIGN=CENTER VALIGN=TOP><font
face="Tahoma">Centimeters<BR><INPUT TYPE="radio" NAME="leni"
VALUE="Centimeters" CHECKED onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Inches<BR><INPUT
TYPE="radio" NAME="leni" VALUE="Inches" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Feet<BR><INPUT
TYPE="radio" NAME="leni" VALUE="Feet" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Yards<BR><INPUT
TYPE="radio" NAME="leni" VALUE="Yards" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Meters<BR><INPUT
TYPE="radio" NAME="leni" VALUE="Meters" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Chains<BR><INPUT
TYPE="radio" NAME="leni" VALUE="Chains" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font
face="Tahoma">Kilometers<BR><INPUT TYPE="radio" NAME="leni"
VALUE="Kilometers" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Miles<BR><INPUT
TYPE="radio" NAME="leni" VALUE="Miles" onClick = ""></font></TD></TR>
<TR><TD ALIGN=CENTER><FONT COLOR="red"
face="Tahoma"><B>Đến:</B></TD>
<TD ALIGN=CENTER VALIGN=TOP><font
face="Tahoma">Centimeters<BR><INPUT TYPE="radio" NAME="leno"
VALUE="Centimeters" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Inches<BR><INPUT
TYPE="radio" NAME="leno" VALUE="Inches" CHECKED onClick =
""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Feet<BR><INPUT
TYPE="radio" NAME="leno" VALUE="Feet" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Yards<BR><INPUT
TYPE="radio" NAME="leno" VALUE="Yards" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Meters<BR><INPUT
TYPE="radio" NAME="leno" VALUE="Meters" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Chains<BR><INPUT
TYPE="radio" NAME="leno" VALUE="Chains" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font
face="Tahoma">Kilometers<BR><INPUT TYPE="radio" NAME="leno"
VALUE="Kilometers" onClick = ""></font></TD>
<TD ALIGN=CENTER VALIGN=TOP><font face="Tahoma">Miles<BR><INPUT
TYPE="radio" NAME="leno" VALUE="Miles" onClick = ""></font></TD></TR>
<TR><TD COLSPAN=9 ALIGN=CENTER VALIGN=TOP><font face="Tahoma">
<INPUT TYPE="button" VALUE=" Đổi " onClick="lenCon();"
style="font-family: Tahoma">
</font><font face="Tahoma" SIZE="1">
<INPUT TYPE="reset" VALUE="Làm lại" style="font-family:
Tahoma"><BR><INPUT TYPE="text" NAME="lenout" SIZE=60 VALUE=""
onClick="lenCon();">
</font></TD></TR>
</TABLE>
</FORM>
</CENTER>
Chúc các bạn thành công
Thủ thuật blog Violet
Cao Bằng @ 21:44 27/12/2009