SyntaxFix
Write A Post
Hire A Developer
Questions
try this:
if($('input').attr('readonly') == undefined){ alert("foo"); }
if it is not there it will be undefined in js
undefined