<!DOCTYPE HTML>
<html>
<body>
<p>Before the script...</p>
<p id="demo1-1"></p>
<script>
var text="'Hello, world!......";
alert( 'Hello, world!' );
document.getElementById("demo1-1").innerHTML = text;
</script>
<p>...After the script.</p>
</body>
</html>
輸出畫面
Before the script...
'Hello, world!......
...After the script.執行狀況
沒有留言:
張貼留言