We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

masaya on 07/18/06


Tagged

javascript html navigation


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

jkochis


Basic Navigation Script - setNav


Published in: JavaScript 


  1. setNav = function(){
  2. var _html = "";
  3. _html += "<ul id='nav'>";
  4. _html += " <li class='Home'><a href='/' title=''>Home</a></li>";
  5. _html += " <li class='About'><a href='/' title=''>About</a></li>";
  6. _html += " <li class='News'><a href='/' title=''>News</a></li>";
  7. _html += " <li class='Contact'><a href='/' title=''>Contact</a></li>";
  8. _html += "</ul>";
  9. document.write(_html);
  10. }

Report this snippet 

You need to login to post a comment.