2.6.Javascript--数值型

<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>数值型</title>
</head>
<body>
<script type="text/javascript">

var num = 1988;
/*
if(!isNaN(num)){
document.write("非数值型");
}
*/

if(num.constructor == Number){
document.write(
"数值型");
document.write(
typeof num.toString());
}
document.write(
"<br/>");
document.write(Number.MAX_VALUE
+ "<br/>");
document.write(Number.MIN_VALUE
+ "<br/>");

var a = 10 ;
var b = a++ ;//先执行再运算
var c = ++a ;//先运算再执行

//document.write(a + "<br/>");
document.write(b + "<br/>");
document.write(c
+ "<br/>");

</script>
</body>
</html>
posted @ 2012-03-14 16:29  校长阿四  阅读(180)  评论(0编辑  收藏  举报