Javascript function from HTML -


i had question answered on issue. 1 function works fine. 2 functions in javascript files header , nav section don't show up. part of homework assignment calls document.write used. please advise.

function displayheader() {   document.write(     "<h1> "     + "<img src = 'images/petebanner.jpg' alt = 'pistol pete' / >"     + "jason lemon 's javascript website!"      + "<img src = 'images/petebanner.jpg' alt = 'pistol pete' / > </h1>"   ); };  function displaynav()  {      document.write("<ul class="nav">" + "         <li><a href="index.html">home</a></li>" + "         <li><a href="csp02.html">chp 2</a></li>;" + "         <li><a href="csp03.html">chp 3</a></li>" + "         <li><a href="csp04.html">chp 4</a></li>" + "         <li><a href="csp05.html">chp 5</a></li>" + "         <li><a href="csp06.html">chp 6</a></li>" + "         <li><a href="csp07.html">chp 7</a></li>" + "         <li><a href="csp08.html">chp 8</a></li>" + "         <li><a href="csp09.html">chp 9</a></li>" + "         <li><a href="csp10.html">chp 10</a></li>" + "         <li><a href="csp11.html">chp 11</a></li>" + "         <li><a href="csp12.html">chp 12</a></li> / > </ul> ");  } 

if that's code, have errors in function displaynav().

note of attributes, such class or href, have " instead of \" or '... causes javascript interpreter variable (i.e. nav, index.html) instead of treating values string.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -