AJM AJM - 2 months ago 6
jQuery Question

Jquery/Javascript Setting the attribute value of a textfield

I have a

<input type='text' id='text' value='' />


How do I programmatically set the value attrribute using JQuery/Javascript

Answer

The simple easy way is:

$("#text").val ("foo");