In this example, I have an input text field that contains a datetime value set with jQuery.
HTML:
<input id="foo" name="foo" type="text" value="" size="55" />
JS:
jQuery(document).ready(function()
{
var now = new Date();
jQuery('#foo').val(now.toString());
});
How can I update this value every 5 seconds from jQuery?
Here's the fiddle: http://jsfiddle.net/28Tgz/1/