Advertisement
Guest User

Untitled

a guest
Mar 16th, 2011
3,131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  5. <title>Insert title here</title>
  6. <script type="text/javascript">
  7.  
  8. function scroll(val)
  9. {
  10. //alert(document.getElementById(val));
  11. document.getElementById(val).click()
  12. }
  13.  
  14. </script>
  15. </head>
  16. <body>
  17. <div id="div1" style="height:200px">
  18. The content of your div1 here.
  19. </div>
  20.  
  21. <div id="div2" style="height:200px">
  22. The content of your div2 here.
  23. </div>
  24.  
  25. <div id="div3" style="height:200px">
  26. The content of your div3 here.
  27. </div>
  28.  
  29. <div id="div4" style="height:200px">
  30. The content of your div4 here.
  31. </div>
  32.  
  33. <div id="div5" style="height:200px">
  34. The content of your div5 here.
  35. </div>
  36.  
  37. <div style="display:none;">
  38. <a href="#div1" id="id1">Link Text Here</a>
  39. <a href="#div2" id="id2">Link Text Here</a>
  40. <a href="#div3" id="id3">Link Text Here</a>
  41. <a href="#div4" id="id4">Link Text Here</a>
  42. <a href="#div5" id="id5">Link Text Here</a>
  43. </div>
  44.  
  45.  
  46.  
  47. <input type="button" onclick="scroll('id1')" value="button1"></input>
  48. <input type="button" onclick="scroll('id2')" value="button2"></input>
  49. <input type="button" onclick="scroll('id3')" value="button3"></input>
  50. <input type="button" onclick="scroll('id4')" value="button4"></input>
  51. <input type="button" onclick="scroll('id5')" value="button5"></input>
  52.  
  53.  
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement