2、 输出方式练习
a) 使用alert:打开页面的时候,就出现一个alert框,显示“欢迎光临!”。
b) 使用ducument.write()在页面上显示红色的“开启JavaScript学习之旅”。
c) 使用console.log():在控制台输出“希望JavaScript不要挂科”。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<script>
/* alert("欢迎光临"); */
document.write("<font color=red>开启JavaScript学习之旅</font>");
console.log("希望JavaScript不要挂科");
</script>
<style>
</style>
<body>
</body>
</html>