<b>Insert a number in either input field, and the number will be converted into either Celsius or Fahrenheit.</b> <br /> <form name="myform"> <input name="celsius" onkeyup="convert('C')"> degrees Celsius<br /> equals<br /> <input name="fahrenheit" onkeyup="convert('F')"> degrees Fahrenheit </form> <br /> Note that the <b>Math.round</b> method is used, so that the result will be returned as a whole number.
</body> </html>
转变字符为数字的例子
<html> <head>
<script type="text/javascript"> function toUnicode()