I want to throw an alert when an input has a \'readonly\' attribute. I have tried this:
if($(\'input\').attr(\'readonly\') == \'readonly\'){ alert(\"foo\"
what about javascript without jQuery ?
for any input that you can get with or without jQuery, just :
input.readOnly
note : mind camelCase