Detect when input has a 'readonly' attribute
<p>I want to throw an alert when an input has a 'readonly' attribute. I have tried this:</p>

<pre><code>  if($('input').attr('readonly') == 'readonly'{

    alert("foo");
  }
</code></pre>

<p>I think that 'if' is not even the best way to do it..</p>

<p>Regards</p>

<p>Javi</p>
