javascript不同数据类型的转换
<script type="text/javascript">
var userEnteredNumber=prompt("Please enter a number","");
document.write(typeof(userEnteredNumber));
document.write("<br />");
document.write(parseFloat(userEnteredNumber));
document.write("<br />");
document.write(parseInt(userEnteredNumber));
userEnteredNumber=Number(userEnteredNumber);
document.write("<br />");
document.write(userEnteredNumber);
document.write("<br />");
document.write(typeof(userEnteredNumber));
</script>