My question is, what would be a way to change focus on an input that has is being built dynamically and has the same name? I want the latest created field to have the focus.
With regards to focus, simply use the focus() method.
Joined: Mar 26, 2009
There is such a thing as an array on an html form... simply use <input type='text' value='Apples' name='fruit'> and <input type='text' value='Oranges' name='fruit'> and on the server side you can retrieve the value of fruit as an array. How would you set the focus on the second field (Oranges) using focus()?