How to disable element
by Komlan
HTML
<input type="text" id="txt" />
<button id="but">Button</button>
JavaScript
$('#but').click(function(){
$('#txt').attr('disabled',"disabled");
alert('dfsdf');
});
by Komlan
<input type="text" id="txt" />
<button id="but">Button</button>
$('#but').click(function(){
$('#txt').attr('disabled',"disabled");
alert('dfsdf');
});