火狐浏览器中的鼠标移动

发布于 2024-07-07 19:59:14 字数 367 浏览 4 评论 0原文

如何在 Firefox 中实现 onmousemove? 我可以在 IE7 中正常运行,但在 Firefox 中没有弹出警报。 是否不支持或采取不同的方式?

<esri:Map ID="Map1" runat="server" MapResourceManager="MapResourceManager1" 
    Height="100%" Width="100%" VirtualDirectory="" 
    PrimaryMapResource="ESRI_Imagery_World_2D" Extent="-130,37,-117,46" 
    onmousemove="alert()" >
</esri:Map>

How do you implement onmousemove in Firefox? I have it working in IE7 but no alert pops in Firefox. Is is not supported or done differently?

<esri:Map ID="Map1" runat="server" MapResourceManager="MapResourceManager1" 
    Height="100%" Width="100%" VirtualDirectory="" 
    PrimaryMapResource="ESRI_Imagery_World_2D" Extent="-130,37,-117,46" 
    onmousemove="alert()" >
</esri:Map>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

昵称有卵用 2024-07-14 19:59:14

我认为问题在于你需要在alert()中放入一些东西,例如:

<esri:Map ID="Map1" runat="server" MapResourceManager="MapResourceManager1" 
                    Height="100%" Width="100%" VirtualDirectory="" 
                    PrimaryMapResource="ESRI_Imagery_World_2D" Extent="-130,37,-117,46" 
                    onmousemove="alert('test');" >
                </esri:Map>

我刚刚尝试过这个并且它在FF中有效:

<div onmousemove="alert('test');" style="height:100px; width:300px; background-color:#f00;"></div>

I thinkk the problem is that you need to put something inside your alert(), such as:

<esri:Map ID="Map1" runat="server" MapResourceManager="MapResourceManager1" 
                    Height="100%" Width="100%" VirtualDirectory="" 
                    PrimaryMapResource="ESRI_Imagery_World_2D" Extent="-130,37,-117,46" 
                    onmousemove="alert('test');" >
                </esri:Map>

I just tried this and it worked in FF:

<div onmousemove="alert('test');" style="height:100px; width:300px; background-color:#f00;"></div>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文