Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
79
rated 0 times [  85] [ 6]  / answers: 1 / hits: 26100  / 8 Years ago, tue, january 17, 2017, 12:00:00

I want to disable submit button when page loads and after finishing the loading of page it becomes active can anyone help me how to do that



<form>
Firstname:
<input type=text>
<button type=submit class=btn btn-primary>Submit</button>
</form>

More From » php

 Answers
14

Try this once



<form>
Firstname:
<input type=text>
<button type=submit class=btn btn-primary disabled>Submit</button>
</form>

<script>
$(document).ready(function(){
$('button').attr('disabled',false);
});
</script>

[#59335] Friday, January 13, 2017, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ronans

Total Points: 460
Total Questions: 109
Total Answers: 108

Location: Slovenia
Member since Sat, Sep 11, 2021
3 Years ago
;