| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 648 人关注过本帖
标题:JS求助,一直没弄明白
只看楼主 加入收藏
yanlinfeng62
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-9-9
结帖率:0
收藏
已结贴  问题点数:0 回复次数:6 
JS求助,一直没弄明白
function hh(s)
{ alert(s);
}
html:<div style="width:150px;height:150px;position: relative;border:#000 groove 1px; margin:0 auto;">
<div onmouseover=hh("sss/fff.l") style="width:100px;height:100px;position:absolute; z-index:1; left:0;top:20px; border:#063 dashed 1px">
<div id='ssh'>dd</div>
</div><img src="map.jpg" width="150px" height="150px" />
</div>

这段代码在FF google上都没问题 在IE上却有时候出现鼠标移上去之后不执行hh(s)函数,但是去掉<img>标签 就没问题
麻烦高手解答下。
搜索更多相关主题的帖子: function html google 
2011-09-09 12:18
foktime
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:奥斯维辛
等 级:贵宾
威 望:35
帖 子:795
专家分:2742
注 册:2009-9-4
收藏
得分:7 
你用IE什么版本测试?9?10?我从5.5开始到8测的都正常
2011-09-09 14:37
wangxianping
Rank: 2
等 级:论坛游民
帖 子:13
专家分:22
注 册:2011-9-8
收藏
得分:7 
<html>
  <head>
     <meta http-equiv="content-type" keywords="select" description="select相关的内容" content="text/html;charset=gb2312">
     <title></title>
  </head>
  <script languang="JavaScript">
      function hh(s)
          { alert(s);
             }

  </script>
  <body>
    <div style="width:150px;height:150px;position: relative;border:#000 groove 1px; margin:0 auto;">
           <div onmouseover=hh("sss/fff.l") style="width:100px;height:100px;position:absolute; z-index:1; left:0;top:20px; border:#063 dashed 1px">
              <div id='ssh'>dd</div>
   </div>
 <img src="C:\Documents and Settings\wangxianping\桌面\banana.jpg" width="150px" height="150px" />
</div>

  </body>
</html>
2011-09-09 15:05
刘杰明
Rank: 8Rank: 8
来 自:山东大学威海校区
等 级:蝙蝠侠
帖 子:155
专家分:872
注 册:2011-6-20
收藏
得分:7 
是IE浏览器的加载项的问题吧,设置一下就好了

______________________________加油__!__!___!
2011-09-13 10:59
suiyuexiao
Rank: 2
等 级:论坛游民
帖 子:9
专家分:16
注 册:2011-9-24
收藏
得分:0 
我也想知道答案,我测试过了,确实如楼主说的那样 ,我在IE8上面测试的
2011-09-24 18:09
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
收藏
得分:0 
程序代码:
<html>
<head>
<meta http-equiv="content-type" keywords="select" description="select相关的内容" content="text/html;charset=gb2312">
<title></title>
<script languang="JavaScript">function hh(s){alert(s);}</script>
</head>

<body>
<div style="width:150px;height:150px;position: relative;border:#000 groove 1px; margin:0 auto;">
    <div onmouseover=hh("test") style="width:100px;height:100px;position:absolute;z-index:1;left:0;top:20px;border:#063 dashed 1px">
        <div id="ssh">dd</div>
    </div>
    <img src="https://bbs.bccn.net/images/default/star_level2.gif" />
</div>
</body>
</html> 
IE8没问题
2011-09-27 14:13
js新手
Rank: 2
等 级:论坛游民
帖 子:3
专家分:15
注 册:2011-9-29
收藏
得分:0 
我也试了一下 可以
2011-09-29 22:40
快速回复:JS求助,一直没弄明白
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015076 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved