0
如何將ajaxStart/ajaxStop綁定到窗體?如何將ajaxStart/ajaxStop綁定到表單?
我需要一個裝載模塊,顯示上載
現在的形式是不是在所有
var iframe = $('<iframe name="iframe_file_upload" src="'+src_file_upload+'" style="display:none"></iframe>');
var btn_send = $('<input type="button" />')
.click(function(){
$('#form_upload_file').bind('ajaxStart', function(){
$(this).submit();
});
iframe.bind('ajaxStop', function(){
$(this).load(function(){
...
更新
var btn_send = $('<input type="button" />')
.click(function(){
$('#form_upload_file').ajaxForm(
$('#form_upload_file').ajaxForm({
success : function(response){
// the response is a string?! how can the response be retrieved as an JSON object?
alert(response);
}
}
}).submit();
});
嘗試'$(「#提交的文件form_upload_file「)。ajaxStart(function(){ iframe.show(); });' – diEcho 2012-04-09 08:35:07
該iframe必須保持隱藏..該文件是從iframe – clarkk 2012-04-09 08:36:18
上傳你想要顯示然後? – diEcho 2012-04-09 08:37:53