put cursor at end of text input’s value

Upgrade to @harsha’s answer

I found that to make solution work with Firefox,
we need temporary reset value to “not-equal of value”, then set it back

<input type="text" autofocus value="value text" onfocus="var temp_value=this.value; this.value=""; this.value=temp_value" />

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)