如何在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>
有帮助吗?

解决方案

我认为问题在于您需要在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>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top