我有一个项目,我必须在监视器上输出一些安全信息。我让它工作得很好,但其中的日期是动态的,我需要一个表格来让任何人都可以轻松更改信息。这是其中一页的代码。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>First Aid Days</title>
<style type="text/css">
/*circle image */
#imgFirstaid { position: absolute; top: 10px; left: 110px; z-index: 0; }
/* large xx of days in the center of the circle */
#strFirstaid{ width: 579px; height: 579px; text-align: center; margin-top: 125px; position: absolute; top: 25px; left: 115px; z-index: 0; font-family: calibri; font-weight: bold; font-size: 250px; color: #403152; }
/* small date at the bottom of the circle */
#txtFirstaid{ width: 579px; height: 579px; text-align: center; margin-top: 365px; position: absolute; top: 25px; left: 115px; z-index: 0; font-family: calibri; font-size: 28px; color: #403152; }
</style>
<script>
function GetFirstaid(){
var then = new Date(2013, 2, 27), // month is zero based, i.e. jan = 0 (yyyy, m, dd)
now = new Date; // no arguments -> current date
// 24 hours, 60 minutes, 60 seconds, 1000 milliseconds
out=Math.abs((now - then) / (1000 * 60 * 60 * 24)); // round the amount of days
rou=Math.round(out)
document.getElementById('strFirstaid').innerHTML=rou;
}
window.onload=function(){GetFirstaid();}//call when everything has loaded
</script>
</head>
<body>
<div id="imgFirstaid"><img src="../images/lg-f.png" /></div>
<div id="strFirstaid"></div>
<div id="txtFirstaid">_____________________ <br />03/27/2013</div> <!-- enter the date as normal -->
</body>
</html>
就像我说的,现在的输出效果很好,但我想知道我是否可以用这个 html 绑定一个表单,或者我是否需要重新开始并使用一些 ASP 或 javascript?