日期:2014-05-17  浏览次数:20599 次

onMouseOver下的处理函数

<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>


onMouseOver下的处理函数showSubMenu() 
为什么无法在页面javascript代码里无法找到此函数定义的地方
或者是这种函数是系统已经定义好的?直接调用就可以?求高人详细指点  在线等待  酌情加分
------解决方案--------------------
javascript一般有内部和外部的写法:
1.内部的
  写在head里面:<head><script></script></head>
或者写在body的任何地方;
2.外部的调用:
例如:
<script type='text/javascript' src='路径.js'></script>

------解决方案--------------------
你的showSubMenu()方法是在页面上写的还是在外部js文件中写的,如果是在外部js文件中写的,最好在<head><script type='text/javascript' src='路径.js'>