>웹 프론트엔드 >HTML 튜토리얼 >onMouseOver下的处理函数_html/css_WEB-ITnose

onMouseOver下的处理函数_html/css_WEB-ITnose

WBOY
WBOY원래의
2016-06-24 12:16:101141검색

<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里面:

<script></script>
或者写在body的任何地方;
2.外部的调用:
例如:
<script></script>

你的showSubMenu()方法是在页面上写的还是在外部js文件中写的,如果是在外部js文件中写的,最好在

<script></script>中导入,这样页面在一加载的时候,js文件也加载进来了.......

真的是太感谢了

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.