parseInt转化不好 吗
parseInt转化不好 吗
parseInt转化不好 吗
2015-08-08
我觉得一样吧因为我用下面这个程序测试了一下
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
if(Math.ceil(Math.random()) == parseInt(Math.random())){
document.write("True");
}
else{
document.write("False");
}
</script>
</head>
<body>
</body>
</html>返回结果一直是true,换做其他数字也是true
如有不对,欢迎拍砖!
举报