onmousemove在firefox中

问题描述 投票:0回答:1

你如何在Firefox中实现onmousemove?我在IE7中工作,但在Firefox中没有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()" >
</esri:Map>
javascript firefox events esri
1个回答
3
投票

我认为问题在于您需要在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>
© www.soinside.com 2019 - 2024. All rights reserved.