W3Schools.com

Password disabled Property

Password Object Reference Password Object

Examples

Example 1

Disable a passoword field:

<script type="text/javascript">

document.getElementById("pwd").disabled=true;

</script>

The result will be:


Try it yourself »


Definition and Usage

The disabled property sets or returns whether a password field is disabled, or not.

A disabled element is unusable and un-clickable. Disabled elements are usually rendered in gray by default in browsers.

Syntax

Set the disabled property:

element.disabled=true|false

Return the disabled property:

element.disabled


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The disabled property is supported in all major browsers.


Password Object Reference Password Object
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE