Hi! How I can use this code live date time without onload?
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function DateTime() {
window.setTimeout("DateTime()", 1000);
var dt = new Date();
document.getElementById("txtDate").value = dt.toLocaleString();
}
</script>
</head>
<body onload="DateTime()">
<form id="form1" runat="server">
<div>
<input id="txtDate" type="text" />
</div>
</form>
</body>
</html>