javascrips打印helloworld的三种方式
1.网页页面输出
- doucment.write(“helloworld”)
2.网页弹窗输出
- alert(“helloworld”)
3.控制台输出
- console.log(“helloworld”)
源码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Helloworld</title>
</head>
<body>
<script>
//页面输出
document.write("helloworld")
//弹窗输出
alert("helloworld")
//控制台输出
console.log("helloworld")
</script>
</body>
</html>