为什么firefox获取不到呢? 本帖最后由 zlz0595 于 2010-08-28 11:48:35 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在firefox下显示e is undefined错误! 在调用的时候要传进去<script type="text/javascript">function get_m(e){ e=e?e:window.event; alert(e.clientX);}</script><a href="javascript:void(0)" onclick="get_m(event);">点我</a> +<script type="text/javascript">function get_m(e){ e = e || window.event; alert(e.clientX);}</script><a href="javascript:void(0)" onclick="get_m(event);">点我</a> 谢谢,可以是可以了!但是为什么我看到别人都无需传event进去而且为什么一定要写event呢能帮忙解释一下不 写到html和写到js里是不一样的<a href="javascript:void(0)" onclick="get_m(event);">点我</a><a id="a" href="javascript:void(0)">点我</a><script>document.getElementById("a").onclick = get_m;</script> 不吃饭在线等个jquery插件的fancybox 的应用问题,关闭图片后,页面上图片也消失了? jQuery中的属性选择器要不要加@?????? 去除字符串中相同的字符 怎么获取别人网站的JavaScript代码 求网页上文本框ctrl+z为什么无效? 求高人指点 radio的选择判断!? 一段文本很长,怎样分页? 下拉菜单问题, 百度地图API BMap.Circle 循环画圆 有问题... 动态创建的td对指定给它的onclick不响应 也不报错 用Javascript 获取asp.net DataList模板中控件值的问题
function get_m(e){
e=e?e:window.event;
alert(e.clientX);
}
</script>
<a href="javascript:void(0)" onclick="get_m(event);">点我</a>
function get_m(e){
e = e || window.event;
alert(e.clientX);
}
</script>
<a href="javascript:void(0)" onclick="get_m(event);">点我</a>
谢谢,可以是可以了!但是为什么我看到别人都无需传event进去而且为什么一定要写event呢能帮忙解释一下不
<script>
document.getElementById("a").onclick = get_m;
</script>