<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=UTF-8" />
<title>签到</title>
</head>
<body>
<div>
<form>学号:
<input type=text>
<input type="button" value="confirm" onclick="qiandao()">
</form>
</div>
<div>
<form id='my_form' name='my'>
<!-- <p id='qiandao'></p>-->
<p id="my1"></p>
</form>
</div>
</body>
<script language="JavaScript">
i = 0;
function qiandao()
{
i += 1;
var AA=new Date();
var month=AA.getMonth()+1;
var my_form = document.getElementById('my_form');
var oCont=document.createTextNode('学号:'+document.forms[0].elements[0].value+"; 签到时间:"+AA.getFullYear()+'-'+AA.getMonth()+'-'+AA.getDate()+' '+AA.getHours()+':'+AA.getMinutes()+':'+AA.getSeconds());
my_form.appendChild(oCont);
//var oCont=document.createTextNode("事由:");//“事由”是字符串,可以直接替换成其他字符串字符
//alert('1');//用于调试
}
</script>
</html>