Forms 提交后的jquery移动禁用按钮

Forms 提交后的jquery移动禁用按钮,forms,jquery-mobile,Forms,Jquery Mobile,我有一个jquery移动站点,用户在其中上传文件。它工作正常,但文件可能需要几秒钟,我不希望用户再次单击cubmit按钮或认为上传不起作用。我需要在用户提交后禁用一个按钮,我还想将按钮文本更改为“处理…”。请记住,这是jquery mobile,因为大多数jquery方法在jquery mobile上都不起作用。下面的代码工作不正常。有什么想法吗 <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.

我有一个jquery移动站点,用户在其中上传文件。它工作正常,但文件可能需要几秒钟,我不希望用户再次单击cubmit按钮或认为上传不起作用。我需要在用户提交后禁用一个按钮,我还想将按钮文本更改为“处理…”。请记住,这是jquery mobile,因为大多数jquery方法在jquery mobile上都不起作用。下面的代码工作不正常。有什么想法吗

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"/>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>

<script>
$( '#button1' ).click( function() { 
    $('#button1' ).attr('disabled', 'disabled').button('disable');
    $('#button1').prev('span').find('span.ui-btn-text').text("Processing..."); 
});
</script>

<form name="myform" action="gohere.cfm" method="post" enctype="multipart/form-data" data-ajax="false">
    <input type="file" name="fileName" id="fileName">

    <button type="submit" id="button1" name="button1" >Upload</button>
</form>

$('#按钮1')。单击(函数(){
$('#button1').attr('disabled','disabled').button('disabled');
$('#button1').prev('span').find('span.ui btn text').text(“处理…”);
});
上载