Script.js
below:
The W3C DOM is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document.
document.getElementById
.
The following example “finds” the element with id="foot01"
and id="nav01"
in the HTML files, and changes its content (innerHTML
):
~/public_html/demo/OracleJSON/Script.js
|
document.getElementById("foot01").innerHTML = "<p>© " + new Date( ).getFullYear( ) + " Wen-Chen Hu. All rights reserved.</p>"; document.getElementById("nav01").innerHTML = "<ul id='menu'>" + "<li><a href='index.html'>Home</a></li>" + "<li><a href='Students.html'>Data</a></li>" + "<li><a href='About.html'>About</a></li>" + "</ul>"; |