锚的数组

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function linkTo(y)
  5. {
  6. var x=window.open("/example/hdom/anchors.htm","","scrollbars=yes,width=250,height=200")
  7. x.location.hash=y
  8. }
  9. </script>
  10. </head>
  11.  
  12. <body>
  13. <h3>Links and Anchors</h3>
  14. <p>点击一个按钮,来显示第二个窗口中的锚。</p>
  15. <input type="button" value="0" onclick="linkTo(0)">
  16. <input type="button" value="1" onclick="linkTo(1)">
  17. <input type="button" value="2" onclick="linkTo(2)">
  18. <input type="button" value="3" onclick="linkTo(3)">
  19. </body>
  20.  
  21. </html>