Hi! Can I use this code live date time under button_click?
I want write this code in default.aspx.cs.
<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>
<form id="form1" runat="server">
<div>
<input id="txtDate" type="text" />
<input type="button" value="Get Date" onclick="DateTime()" />
</div>
</form>
</body>
</html>