努力努力再努力圈
2020-02-21 11:40
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
document.write(Math.ceil(3.3))<br/>
document.write(Math.ceil(-0.1))<br/>
document.write(Math.ceil(-9.9))<br/>
document.write(Math.ceil(8.9))<br/>
</script>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
document.write(Math.ceil(3.3)+"</br>")
document.write(Math.ceil(-0.1))
document.write(Math.ceil(-9.9))
document.write(Math.ceil(8.9))
</script>
</head>
<body>
</body>
</html>
//</br>是HTML 输出方式有问题哦
</br>是HTML的输出方法
js里document.write(Math.ceil(3.3)+"</br>")要这样用
补充:不要忘了分号 ;
JavaScript进阶篇
468061 学习 · 21891 问题
相似问题