title: Programmatically selecting text in an input field on iOS devices (mobile Safari)
body: <p>How do you programmatically select the text of an input field on iOS devices, e.g. iPhone, iPad running mobile Safari?</p>
  
  <p>Normally it is sufficient to call the <code>.select()</code> function on the <code>&lt;input ... /&gt;</code> element, but this does not work on those devices.  The cursor is simply left at the end of the existing entry with no selection made.</p>