<html>
<body>
<script>
function updateTime(form)
{
year = form.year.value;
month = form.month.value;
day = form.day.value;
minute = form.minute.value;
hour = form.hour.value;
string1 = "民國"+(year-1911)+"年"+month+"月"+day+"日,";
string2 = hour+"點"+minute+"分";
form.ChineseDate.value = string1 + string2;
}
</script>
<form>
請輸入西元年代與時間:<br>
Year: <input type="text" size=3 name="year">
Month: <input type="text" size=3 name="month">
Day: <input type="text" size=3 name="day">
Hour: <input type="text" size=3 name="hour">
Minute: <input type="text" size=3 name="minute">
<p>
<input type="button" name="Transform" value="轉換" onclick="updateTime(this.form)">
<p>
轉換後:<br>
<textarea name="ChineseDate" rows=2 cols=30></textarea>
<br>
</form>
</body>
</html>