我正在尝试从JavaScript中打印一些内容到我的HTML页面上。我已经尝试了以下代码,但它没有生效:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>I am trying to print <script>go();</script></p>
<script>
function go() {
document.write("Hello World!");
}
</script>
</body>
</html>