Naveen puttu wrote:i tried using and it doesnt seem to work
Of course not. What's returned from the $() function is a jQuery wrapped set, upon which you must call jQuery methods. The focus() method that (I think) you are trying to use is defined on the DOM elements, not jQuery. So in order to use focus, you must obtain the element from the jQuery wrapped set.
One way:
This uses the jQuery get() method to obtain the element.
The jQuery wrapped set also acts like an array, so you could also use:
By the way using [id=whatever] in a selector would be considered sloppy, use the # notation when obtaining elements by id.