<div id="channelmenu"> <a href="index.php" target="_self" class="channelmenu_main" id="channelmenu_main_0" onMouseOver="showSubMenu('channelmenu_main','channelmenu_sub',0)">网站首页</a><div id="menuright" style="float:left;height:27px;width:2px;margin-right:5px;background:url(menu/templates/images/channelmenu_diy/li.gif) no-repeat;"></div> <a href="page/html/company.php" target="_self" class="channelmenu_main" id="channelmenu_main_1" onMouseOver="showSubMenu('channelmenu_main','channelmenu_sub',1)">关于我们</a><div id="menuright" style="float:left;height:27px;width:2px;margin-right:5px;background:url(menu/templates/images/channelmenu_diy/li.gif) no-repeat;"></div> <a href="news/class/?104.html" target="_self" class="channelmenu_main" id="channelmenu_main_2" onMouseOver="showSubMenu('channelmenu_main','channelmenu_sub',2)">服务领域</a><div id="menuright" style="float:left;height:27px;width:2px;margin-right:5px;background:url(menu/templates/images/channelmenu_diy/li.gif) no-repeat;"></div> <a href="page/solution/?83.html" target="_self" class="channelmenu_main" id="channelmenu_main_3" onMouseOver="showSubMenu('channelmenu_main','channelmenu_sub',3)">解决方案</a><div id="menuright" style="float:left;height:27px;width:2px;margin-right:5px;background:url(menu/templates/images/channelmenu_diy/li.gif) no-repeat;"></div> <a href="news/class/?86.html" target="_self" class="channelmenu_main" id="channelmenu_main_4" onMouseOver="showSubMenu('channelmenu_main','channelmenu_sub',4)">新闻动态</a><div id="menuright" style="float:left;height:27px;width:2px;margin-right:5px;background:url(menu/templates/images/channelmenu_diy/li.gif) no-repeat;"></div> <a href="page/case/case.php" target="_self" class="channelmenu_main" id="channelmenu_main_5" onMouseOver="showSubMenu('channelmenu_main','channelmenu_sub',5)">成功案例</a><div id="menuright" style="float:left;height:27px;width:2px;margin-right:5px;background:url(menu/templates/images/channelmenu_diy/li.gif) no-repeat;"></div> <a href="page/feedback/feedback.php" target="_self" class="channelmenu_main" id="channelmenu_main_6" onMouseOver="showSubMenu('channelmenu_main','channelmenu_sub',6)">需求反馈</a><div id="menuright" style="float:left;height:27px;width:2px;margin-right:5px;background:url(menu/templates/images/channelmenu_diy/li.gif) no-repeat;"></div> <a href="page/contact/contact.php" target="_self" class="channelmenu_main" id="channelmenu_main_7" onMouseOver="showSubMenu('channelmenu_main','channelmenu_sub',7)">联系方式</a><div id="menuright" style="float:left;height:27px;width:2px;margin-right:5px;background:url(menu/templates/images/channelmenu_diy/li.gif) no-repeat;"></div>
javascript一般有内部和外部的写法:
1.内部的
写在head里面:
你的showSubMenu()方法是在页面上写的还是在外部js文件中写的,如果是在外部js文件中写的,最好在
<script></script>中导入,这样页面在一加载的时候,js文件也加载进来了.......真的是太感谢了