求大神看看哪里错了
求大神看看哪里错了
求大神看看哪里错了
2016-12-30
你看看你document里面有没有多余的变量
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> 卸载事件 </title>
<script type="text/javascript">
var mypi=Math.PI;
var myabs=Math.abs(-15);
var mysource=Math.sqrt(9);
var myceil=Math.ceil(11.11);
var myfloor=Math.floor(11.11);
var myacos=Math.acos(0);
var myasin=Math.asin(1);
var myexp=Math.exp(0);
var mymax=Math.max(0.88,1.88);
var mypow=Math.pow(3,3);
var myrandom=Math.random();
document.write(mypi+"<br />");
document.write(myabs+"<br />");
document.write(mysource+"<br />");
document.write(myceil+"<br />");
document.write(myfloor+"<br />");
document.write(myacos+"<br />");
document.write(myasin+"<br />");
document.write(myexp+"<br />");
document.write(mymax+"<br />");
document.write(mypow+"<br />");
document.write(myrandom+"<br />");
</script>
</head>
<body>
<h1>欢迎学习JavaScript!!!<h1>
</body>
</html>
举报