kwek-kwek kwek-kwek - 2 days ago 5
Javascript Question

disabling an input button

I want to disable this button on document ready but I'm new to it so please help:

Here is my code:

$(document).ready function {
setTimeout("check_user()", 250);
}


please help

Answer

If button's id is button1, this should work.

$('#button1').attr('disabled', 'disabled');
Comments