WEB开发网
开发学院网页设计JavaScript JS实现键盘控制的菜单 阅读

JS实现键盘控制的菜单

 2010-09-14 13:29:57 来源:WEB开发网   
核心提示: //页面加载时调用即可.window.onload=function(){var tc=new tabControl('top_links','left_links_item','itemfor_');try{tc.bindEventForT

//页面加载时调用即可.

  window.onload=function(){
  var tc=new tabControl('top_links','left_links_item','itemfor_');
  try{
  tc.bindEventForTopLinks();
  tc.bindKeyEvent();
  }catch(e){try{tc.topLinksArr[0].focus()}catch(e){}}
  }
</script>
</head>
<body>
<div id="top">
<div id="top_links">
  <a href="http://j5c.ddvip.com/index.php#" id="top_link_1">快乐故事吧</a>
   <a href="http://j5c.ddvip.com/index.php#" id="top_link_2">启蒙知识学堂</a>
   <a href="http://j5c.ddvip.com/index.php#" id="top_link_3">儿童音乐屋</a>
   <a href="http://j5c.ddvip.com/index.php#" id="top_link_4">游戏总动员</a>
   <a href="http://j5c.ddvip.com/index.php#" id="top_link_5">葡萄树下的欢歌</a>
</div>
</div>
<div id="left"COLOR: #0000cc">>
<div id="left_links_item">
    <div id="itemfor_top_link_1" >
     <a href="">itemfor_top_link_1</a>
      <a href="">itemfor_top_link_1</a>
      <a href="">itemfor_top_link_1</a>
      <a href="">itemfor_top_link_1</a>
      <a href="">itemfor_top_link_1</a>
      <a href="">itemfor_top_link_1</a>
    </div>
     <div id="itemfor_top_link_2" >
     <a href="">itemfor_top_link_2</a>
     <a href="">itemfor_top_link_2</a>
     <a href="">itemfor_top_link_2</a>
     <a href="">itemfor_top_link_2</a>
     <a href="">itemfor_top_link_2</a>
     <a href="">itemfor_top_link_2</a>
    </div>
     <div id="itemfor_top_link_3" >
     <a href="">itemfor_top_link_3</a>
     <a href="">itemfor_top_link_3</a>
     <a href="">itemfor_top_link_3</a>
     <a href="">itemfor_top_link_3</a>
     <a href="">itemfor_top_link_3</a>
     <a href="">itemfor_top_link_3</a>
    </div>
     <div id="itemfor_top_link_4">
     <a href="">itemfor_top_link_4</a>
     <a href="">itemfor_top_link_4</a>
     <a href="">itemfor_top_link_4</a>
     <a href="">itemfor_top_link_4</a>
     <a href="">itemfor_top_link_4</a>
     <a href="">itemfor_top_link_4</a>
     <a href="">itemfor_top_link_4</a>
    </div>
     <div id="itemfor_top_link_5" >
     <a href="">itemfor_top_link_5</a>
     <a href="">itemfor_top_link_5</a>
     <a href="">itemfor_top_link_5</a>
     <a href="">itemfor_top_link_5</a>
     <a href="">itemfor_top_link_5</a>
     <a href="">itemfor_top_link_5</a>
     <a href="">itemfor_top_link_5</a>
     <a href="">itemfor_top_link_5</a>
    </div>
  </div>
</div>
</body>
</html>

上一页  1 2 

Tags:JS 实现 键盘

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接