I have a <input type="text" value="Hi! Enter Here" >
How to open this in selected mode and cursor on the input field.
We just start writting into it
I have a <input type="text" value="Hi! Enter Here" >
How to open this in selected mode and cursor on the input field.
We just start writting into it
use jquery focus()
function
$('input').focus();
Or better
<input type="text" value="Hi! Enter Here" id="someid">
and
$('#someid').focus();
check working example here.
For select and focus
$('#someid').focus().select();
or
$('#someid').focus(function (){$(this).select();});
On jsfiddle.net
Set the id of the input
<input type="text" id="myText" value="Hi! Enter Here" >
Then add this jQuery
$(function() {
$("#myText").focus();
});