<html>
<head>
</head>
<body>
<h1 id="hello">Hello World</h1>
</body>
<script type="text/javascript" src="sample0301.js"></script>
</html>
以下の JavaScript により、 "Hello World" の文字が "Good Morning" に書き換わります。
const element = document.getElementById('hello');
element.innerText = "Good Morning";
2のヒント: SetInterval 関数(時計を1秒毎に表示するときに使ったもの)を使ってみましょう。
以下のようにすると、 HTML タグも差し込むことが出来ます。
const element = document.getElementById('hello');
element.innerHTML = '<FONT COLOR="red">Good Morning</FONT>';
$theme: gaia template: invert