Disable a button
Description
The following code shows how to disable a button.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.5.2.js'></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css">
<script type='text/javascript'
src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){<!--from www . j a va 2s . c o m-->
$('#theButton').click(function() {
$('#theButton').attr('disabled',true);
});
});//]]>
</script>
</head>
<body>
<div data-role="page">
<div data-role="content">
<input type="button" id="theButton" name="theButton"
value="The Button">
</div>
</div>
</body>
</html>