2011-01-12 9 views

答えて

5

あなたは$.attr()方法、

$("input.myBtn").click(function(){ 
    $(this).attr('disabled', true); 
}); 

でそれを無効にするか、$.replaceWith()方法でテキストに置き換えることもできます。 jQueryを使って

$("input.myBtn").click(function(){ 
    $(this).replaceWith('<p>Processing your order. Please wait.</p>'); 
}); 
+0

'replaceWith'はおそらくOPの要求を考慮すると最高です。 :) –

1

$('#your-button-id').html('Please wait'); 
+0

これで無効にはなりません。 –

2
$('input:button').click(function() { 
    $(this).attr('disabled', true); 
}); 
関連する問題