w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About

Submit Object disabled Property


Submit Object Reference Submit Object

Definition and Usage

The disabled property sets or returns whether or not a submit button should be disabled.

Syntax

submitObject.disabled=true|false


Example

Example

Alert id, type, and value of a submit button, and disable button:

<html>
<head>
<script type="text/javascript">
function alertId()
{
var txt="Id: " + document.getElementById("submit1").id;
txt=txt + ", type: " + document.getElementById("submit1").type;
txt=txt + ", value: " + document.getElementById("submit1").value;
document.getElementById("submit1").disabled=true;
alert(txt);
}
</script>
</head>
<body>

<form>
<input type="submit" id="submit1" value="Show values" onclick="alertId()" />
</form>

</body>
</html>

Try it yourself »


Submit Object Reference Submit Object

DreamTemplate

WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Cheap UK Web Hosting
WEB BUILDING
XML Editor – Free Trial!
FREE Flash Website
FREE Web Templates
SEO Company
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
SHARE THIS PAGE