...
| Code Block | ||||
|---|---|---|---|---|
| ||||
<html>
<!-- Programmed by Chun Kang -->
<head>
<title>Inner HTML Test 1</title>
</head>
<script>
function addContent(element_id, strContent)
{
document.getElementById( element_id).innerHTML += strContent;
}
function initContent(element_id)
{
document.getElementById( element_id).innerHTML ="";
}
</script>
<body>
<p id="test1">Initial content...<br><</p>
<input type=button onclick="javascript:addContent('test1','hello<br>hello Venus!<br>');" value="hello vinus"><br>
<input type=button onclick="javascript:addContent('test1','hello<br>hello Robo<br>Robo!');" value="hello robo"><br>
<input type=button onclick="javascript:initContent('test1');" value="!init"><br>
</body>
</html> |
...