脚本变得无响应崩溃firefox
Script becomes unresponsive crashing firefox
为什么这个脚本在firefox中提交时会导致错误?它使用jquery。
$(document).ready(function(e) {
$('#errorMessage').hide();
$('#form').submit(function() {
var firstname = $('#formFirstname').val();
if(firstname == '') {
$('#errorMessage').html('Please enter your Name.');
$('#errorMessage').fadeIn();
}
else {
$('#errorMessage').html('Please wait a moment as the form Submits.');
$('#form').submit();
}
return false;
})
});
$('#form').submit();
导致递归?
您正在将jQuery混叠到e
。
将$(document).ready(function(e) {
改为$(document).ready(function() {
或jQuery(document).ready(function($) {
虽然它可能不会导致错误,但在您的代码中e
也是jQuery
的别名,e('#form')
也可以工作
相关文章:
- 为什么这在IE中的工作方式与在Firefox中不同
- JS可以在Chrome中工作,但不能在Firefox中工作
- createElement("a") - FireFox JavaScript
- 为什么javascript:void(0)在Firefox中不起作用
- Facebook登录按钮没有'不能在Firefox上工作
- 在扩展崩溃Firefox中使用JS-ctypes
- Firefox Developer Edition的烦人行为-在调试JS时崩溃很多
- 将大约 300 张画布图像保存在一个数组中并发送一次进行处理,在 chrome 中崩溃,但在 Firefox 中工作正常
- 将currentTime设置为<音频>元素导致Firefox崩溃
- 简单的JavaScript代码使Firefox崩溃
- FusionCharts在FireFox和IE上崩溃
- 代码崩溃Firefox
- 上下文.多个图像的drawImage最终会导致FireFox崩溃
- 脚本变得无响应崩溃firefox
- 我如何运行一个繁重的cpu和内存HTML/javascript程序?(firefox、chrome崩溃)
- 元素排序例程在Firefox中工作,但在Chrome中崩溃
- 循环导致Firefox崩溃
- 这段代码几乎使firefox崩溃.这似乎有效,但实际上并非如此
- JQuery/Javascript - Firefox在简单任务上崩溃,没有控制台错误
- Firefox 28(仅Win7)在JS内存泄漏后崩溃