Codelab Editor
Free Online HTML Editor
Run
Learn jQuery
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jQuery Get Properties with prop() | TutsInsider</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <style> body { font-family: Arial, sans-serif; padding: 30px; background: #f9f9f9; } h2 { color: #222; } label, input { display: block; margin-top: 20px; } button { margin-top: 20px; padding: 10px 20px; background: #3490dc; color: white; border: none; border-radius: 4px; cursor: pointer; } .info { margin-top: 20px; font-weight: bold; color: #2d3748; } </style> </head> <body> <h2>Get Properties with jQuery <code>.prop()</code></h2> <p>This example shows how to retrieve <code>checked</code> and <code>disabled</code> properties using jQuery.</p> <label><input type="checkbox" id="newsletterCheckbox" checked> Subscribe to Newsletter</label> <input type="email" id="emailField" placeholder="Enter your email" disabled> <button id="getPropBtn">Check Properties</button> <div class="info" id="checkedInfo"></div> <div class="info" id="disabledInfo"></div> <script> $(document).ready(function(){ $('#getPropBtn').click(function(){ var isChecked = $('#newsletterCheckbox').prop('checked'); var isDisabled = $('#emailField').prop('disabled'); $('#checkedInfo').text("Checkbox Checked: " + isChecked); $('#disabledInfo').text("Email Field Disabled: " + isDisabled); }); }); </script> </body> </html>
Editor Commands
Ctrl
F
Find
Ctrl
G
Find Next
Ctrl
⇧
G
Find Previous
Ctrl
⇧
F
Find & Replace
Ctrl
]
Indent Code Right
Ctrl
[
Indent Code Left
⇧
Tab
Auto Indent Code
Ctrl
/
Line Comment
Ctrl
Alt
/
Block Comment
TutsInsider Actions
Alt
S
Run Code
Ctrl
C
Copy Editor Code
Ctrl
A
Select All Editor Code
Ctrl
S
Save/Download
Ctrl
Alt
X
Rotate
Ctrl
Alt
T
Switch Theme
Ctrl
⇧
C
Open Console
Esc
Close Console