Is the following javascript script problematic although it can load the desired result? Should document.writeln
be replaced by document.write
or even some other methods? I picked this idea up from the web http://www.wetlandpark.gov.hk/en/
function getheaderHTML() {
document.writeln(' <div id="nav">');
document.writeln(' <a href="index.html">number 1</a>|<a href="students.html">number 2</a>');
document.writeln(' </div>');
document.writeln(' <div id="header">');
document.writeln(' <img src="header.jpg" alt="testing" width=100% height=260>');
document.writeln(' </div>');
}
function getfooterHTML() {
document.writeln(' <div id="footer">');
document.writeln(' ©2016');
document.writeln(' </div>');
}
getheaderHTML();
getfooterHTML();