表单发送 Mootools 1.1 到 Mootools 1.2 后更新 div
我有这个 Mootools 1.1 脚本,它在提交表单后更新 div,
尝试将其转换为 mootools 1.2.4,但日志不起作用,我也没有收到任何错误
Mootools 1.1
$('myform').addEvent('submit', function(e) {
new Event(e).stop();
var log = $('log_res').empty().addClass('ajax-loading');
this.send({
update: log,
onComplete: function() {
log.removeClass('ajax-loading');
}
});
});
mootols 1.2
$('myform').addEvent('submit', function(e) {
new Event(e).stop();
var log = $('log_res').empty().addClass('ajax-loading');
this.set('send',{
update: log,
onComplete: function() {
log.removeClass('ajax-loading');
}
}).send();
});
I have this Mootools 1.1 script that is updating div after the form is submited ,
tried to convert it to mootools 1.2.4 but the log does not work and I am not getting any errors either
Mootools 1.1
$('myform').addEvent('submit', function(e) {
new Event(e).stop();
var log = $('log_res').empty().addClass('ajax-loading');
this.send({
update: log,
onComplete: function() {
log.removeClass('ajax-loading');
}
});
});
mootols 1.2
$('myform').addEvent('submit', function(e) {
new Event(e).stop();
var log = $('log_res').empty().addClass('ajax-loading');
this.set('send',{
update: log,
onComplete: function() {
log.removeClass('ajax-loading');
}
}).send();
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
try this: