兄弟,FireFox是支持带参数的。我的例子如下:
<script type="text/javascript">
function ss(n1,n2,n3){alert("n1:"+n1+" n2:"+n2+" n3:"+n3)}
</script>
<input type="submit" value="提交" onmouseover="ss(11,22,'33')" />你的问题的原因应该是其它错误!
例如countryid.style.top=event.clientY + vartop;
应该改为countryid.style.top=event.clientY + vartop + "px";
等等之类的错误。

解决方案 »

  1.   

    ID_PORTUGAL
    这个参数看着似乎有问题countryid.style.top=event.clientY + vartop;
    这一句也有问题
    在ie中event可以代指window.event但是在firefox里面event是与ie有不同的使用规则的
    向如你这样直接在html代码的里面加入事件句柄的
    如果函数没有参数
    则.firefox事件处理函数调用时,默认传递一个event参数进去
    这样,你的代码就是有效的
    但是一旦你使用了参数,则firefox不传递这个event
    你的代码就出错了<area shape="circle" coords="88,526,6" href="#" target="_self" onmouseover="ShowDiv(ID_PORTUGAL,-170,20)" onmouseout="HiddenDiv(ID_PORTUGAL)">
    <area shape="circle" coords="220,503,6" href="#" target="_self" onmouseover="ShowDiv(ID_SPAIN,-170,20)" onmouseout="HiddenDiv(ID_SPAIN)">
    <area shape="circle" coords="252,378,6" href="#" target="_self" onmouseover="ShowDiv(ID_FRANCE,-130,20)" onmouseout="HiddenDiv(ID_FRANCE)">根据这几行来看
    在不同的area上触发事件,会给句柄不同的参数
    何不给area加上ID属性然后,去掉事件句柄中的参数
    然后在事件处理函数中,使用window.event.target.id(IE下是使用event.target.id)
    获取触发事件的元素ID
    然后根据ID的不同来执行不同的代码
    可以使用Eval来合成动态代码执行的
      

  2.   

    谢谢nanyang9(奋斗…) 和 bingdian37(冰点)的帮助和指教, 对我都很有帮助.正如你们所说: 
    1. "px"对于firefox是必须的.
    2. event参数对于onmouseover中的函数也是必须的, 函数可以带参数, 但对于firefox而言, 必须有event参数.搞定了, 我最后的解决方案:
    function ShowDivEvent(e, thisDiv, varTop, varLeft){
    mx = e.clientX || e.pageX;
    my = e.clientY || e.pageY;
    thisDiv.style.top = my + varTop + "px";
    thisDiv.style.left = mx + varLeft + "px";
    thisDiv.style.visibility="visible";
    thisDiv.style.filter="Alpha(Opacity=70)";
    }function HiddenDivEvent(thisDiv){
    thisDiv.style.visibility="hidden";
    }<body>
    <img src="newmap.png" width="655" height="600" border="0" align="absmiddle" usemap="#Map">
    <map name="Map">
      <area id = "AREA_PORTUGAL" shape="circle" coords="88,526,6" href="#" target="_self" onmouseover="ShowDivEvent(event, document.getElementById('DIV_PORTUGAL'),-170,20)" onmouseout="HiddenDivEvent(document.getElementById('DIV_PORTUGAL'))"> 
    ....................................吃水不忘打井人, 每人30分!!!
    再次感谢!!!
      

  3.   

    To bingdian37(冰点)我在另一帖给你加分了.
      

  4.   

    我的元素是动态创建的,该如何添加事件呢element=document.createElement("span");然后怎样对这个 element标签添加 onmouseover事件,并以自身为参数?我在firfox运行老是出错