下面我们来看看JavaScript的单行注释
// 输出标题:
document.getElementById("dhh").innerHTML="clewo.net";
// 输出段落:
document.getElementById("dhp").innerHTML="This is p.";
<!DOCTYPE html>
<html>
<body>
<h1 id="dhh"></h1>
<p id="dhp"></p>
<script>
// 输出标题:
document.getElementById("dhh").innerHTML="clewo.net";
// 输出段落:
document.getElementById("dhp").innerHTML="This is p.";
</script>
<p><b>注释:</b>注释不会被执行。</p>
</body>
</html>
读完这篇文章后,您心情如何?