我想在当我点击开始时间相同的结束时间时在文本框中显示当前日期&时间。当我点击开始按钮时在文本框中显示当前日期和时间的HTML代码
加法*后点击SUBMIT按钮我的页面被重定向到PHP页面,这是保存我的输入到MYSQL。
代码:
<head>
<title>Survey</title>
</head>
<body>
<Center><b><font size="10" color="White">SURVEY</font></Center></b>
</body>
<body background="logo.jpg">
<BR></BR>
<BR></BR>
<form action="action.php" method="post" />
<p><Center><font size="4" color="White">Employee ID: <input type="text" name="employee_id" /></font></Center></p>
<BR></BR>
<p><Center><font size="4" color="White">Unique ID: <input type="text" name="unique_id" /></font></Center></p>
<BR></BR>
<p><Center><font size="4" color="White">Category: <input type="text" name="category" /></font></Center></p>
<BR></BR>
<p><Center><button >Start Time</Button> <input type="text" name="start_time" /></Center></p>
<BR></BR>
<p><Center><button >End Time</Button> <input type="text" name="end_time" /></Center></p>
<BR></BR>
<Center><input type="submit" value="Submit" /></Center>
</form>
使用JavaScript onclick事件。 – Richie 2014-12-04 07:57:27
请包括您尝试使其发生的代码...另外,您是否正在寻找一个JavaScript实现或需要一个临时页面来显示时间...? – webeno 2014-12-04 07:57:27