日期:2014-05-16 浏览次数:20422 次
<html>
?<script type="text/javascript">
/**
var n1 = 1.7976931348623157E+309;
alert(n1);? //Infinity
?
alert(typeof(NaN)); //?? number
?
alert(typeof(Infinity));?? //number?
?
alert(typeof(null));??? //object
?
alert(typeof(undefined));??? //undefined
?
alert(NaN==NaN);??? //false
?
alert(NaN!=NaN);??? //true
?
alert(NaN>NaN);???? //false
?
alert(null==undefined);?? //true
?
alert(null>=undefined);???? //false
?
alert(null<=undefined);???? //false
?
alert(null==null);?? //true
?
alert(null!=null);??? //false
?
alert(null!=NaN);??? //true
?
alert(null==NaN);?? //false
?
alert(NaN==undefined);? //false?
?
alert(parseInt("123abc"));?? //123
?
alert("123abc"-0);??? //NaN
?
alert(Infinity>10);? //true?
?
alert(Infinity>"abc");??? //false
?
alert(Infinity==NaN);?? //false
?
alert(true==1);??? //true
?
alert(new String("abc")=="abc");?? //true??
?
alert(new String("abc")==="abc");??? //false
?
???
function step(a){??
?
?? return function(x){??
?
????? return x+a++;??
?
?? }??
?
}??
?
var a = step(10);??
?
var b = step(20);??
?
alert(a(10));??
?
alert(b(20));??
?
var a="123abc";??
?
alert(typeof(a++));??
?
alert(a);? */
?</script>
</html>