简体   繁体   English

onclick事件在firefox中不起作用,但在IE中可以正常工作

[英]onclick event not working in firefox but works fine in IE

I got a simple form and it works fine in ie but not working in firefox 我有一个简单的表格,它可以在IE中正常工作,但不能在Firefox中工作

onclick="login('loginuser','../private/loginuser.php?username='+email.value+'&pass='+passw.value,'loginresult');"

Any help appreciated. 任何帮助表示赞赏。

You should start by putting some alert calls in your login function to make sure that your arguments are getting quoted properly. 您应该首先在登录函数中添加一些警报调用,以确保正确引用您的参数。 Something like 就像是

function login (username, password, result) {
  alert(username);
  alert(password);
  alert(result);
  .... rest of function

}

That's not really a form, just an attribute snippet. 那实际上不是表格,只是属性片段。 Install Firebug add-on for Firefox ( https://addons.mozilla.org/en-US/firefox/addon/1843/ ) and eliminate the guesswork by debugging the javascript. 安装适用于Firefox的Firebug插件( https://addons.mozilla.org/en-US/firefox/addon/1843/ ),并通过调试JavaScript消除猜测。 You can set a breakpoint in your login() function and see if everything is ok there or if at least if it gets called. 您可以在login()函数中设置一个断点,查看那里是否一切正常,或者至少是否被调用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 不触发OnClick事件IE8,但在Firefox中工作正常 - Not Triggering OnClick Event IE8 but Works Fine In Firefox 点击事件在Chrome和FireFox中无法正常运行,但在IE浏览器中可以正常运行 - On Click Event is not working in Chrome and FireFox, but works fine in the IE browers 平滑滚动在 firefox 中不工作,在 IE 中工作正常 - smooth scroll not working in firefox, works fine in IE JavaScript无法在IE和Firefox中运行,在Chrome中运行良好 - JavaScript not working in IE and Firefox, works fine in Chrome onclick 函数在 IE 中返回 undefined,在 Chrome 和 Firefox 中工作正常 - onclick function returns undefined in IE, works fine in Chrome and Firefox onKeyUp事件在IE中不起作用,但在Firefox中起作用 - onKeyUp event is not working in IE but works in firefox 事件在IE6中未定义,但在Firefox,Chrome等中正常运行 - Event is undefined in IE6 but works fine in Firefox, Chrome etc 锚标签上的onclick事件在IE中有效,但在Firefox和Chrome中无效 - onclick event on anchor tag works in IE, but not in Firefox and Chrome onclick 功能在 IE 中不起作用,但在其他浏览器上工作正常 - The onclick function is not working in IE but works fine on other browsers 解决“ onpopstate”事件的方法,该事件在chrome中不起作用,但在IE和FireFox中可以正常工作 - Solution for, “onpopstate” event which is not working in chrome, but working fine in IE and FireFox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM