sroebuck sroebuck - 1 year ago 141
HTML Question

Programmatically selecting text in an input field on iOS devices (mobile Safari)

How do you programmatically select the text of an input field on iOS devices, e.g. iPhone, iPad running mobile Safari?

Normally it is sufficient to call the

function on the
<input ... />
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.

Answer Source
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download