onmousemove在firefox中

时间:2008-10-04 22:07:20

标签: javascript firefox events esri

如何在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>

1 个答案:

答案 0 :(得分: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>