<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <script src="../Scripts/jquery-1.8.0.min.js"></script> <style> div { border:solid 1px white; font-family:黑体; } .centerT { /*height:960px;*/ } .centerT, .centerT tr, .centerT td { border-bottom:solid 1px white; border-left:solid 1px white; border-right:solid 1px white; border-collapse:collapse; } .title { color:white; font-family:黑体; font-size:40px; font-weight:700; width:384px; height:100px; text-align:center; background-color:blue; } .content { color:white; font-family:黑体; font-size:40px; width:384px; height:122.8px; line-height:122.8px; text-align:center; } </style> <script> $(function () { setInterval("getDate()", 1000); setInterval("getTable()", 3000); }); function getDate() { var today = new Date(); $("#DivTimer").text(today.Format("yyyy-MM-dd hh:mm:ss")); } // 对Date的扩展,将 Date 转化为指定格式的String // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) // 例子: // (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 // (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18 Date.prototype.Format = function (fmt) { //author: meizz var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "h+": this.getHours(), //小时 "m+": this.getMinutes(), //分 "s+": this.getSeconds(), //秒 "q+": Math.floor((this.getMonth() + 3) / 3), //季度 "S": this.getMilliseconds() //毫秒 }; if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); for (var k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; } function getTable() { $.ajax({ type: "GET", url: "../Handler/StationPlanHandler.ashx?method=GetTableContent", dataType: "json", success: function (result) { var res = result["result"]; for (var i = 0; i < res.length; i++) { $("td[name='contentS" + (i + 1) + "']").text(res[i].StationNo); $("td[name='contentP" + (i + 1) + "']").text(res[i].ProductName); $("td[name='contentN" + (i + 1) + "']").text(res[i].PlanCount); $("td[name='contentB" + (i + 1) + "']").text(res[i].BeginTime); $("td[name='contentE" + (i + 1) + "']").text(res[i].EndTime); } } }) } </script> </head> <body> <table style="background-color:black; width:1920px; height:1080px;"> <tr> <td style="height:120px;"> <div style="background-image: url('../Pic/Logo.png'); width:187px; height:120px; display:inline-block; float:left;"></div> <div style="color:white;display:inline-block; width:1170px; height:120px; text-align:center; font-size:100px; float:left;">机台计划信息</div> <div id="DivTimer" style="display:inline-block; color:white; font-size:50px; text-align:center; width:550px; line-height:120px; float:left;"></div> </td> </tr> <tr> <td> <table class="centerT"> <tr><td class="title">机台</td><td class="title">产品名称</td><td class="title">计划数量</td><td class="title">开始时间</td><td class="title">结束时间</td></tr> <tr><td name="contentS1" class="content"></td><td name="contentP1" class="content"></td><td name="contentN1" class="content"></td><td name="contentB1" class="content"></td><td name="contentE1" class="content"></td></tr> <tr><td name="contentS2" class="content"></td><td name="contentP2" class="content"></td><td name="contentN2" class="content"></td><td name="contentB2" class="content"></td><td name="contentE2" class="content"></td></tr> <tr><td name="contentS3" class="content"></td><td name="contentP3" class="content"></td><td name="contentN3" class="content"></td><td name="contentB3" class="content"></td><td name="contentE3" class="content"></td></tr> <tr><td name="contentS4" class="content"></td><td name="contentP4" class="content"></td><td name="contentN4" class="content"></td><td name="contentB4" class="content"></td><td name="contentE4" class="content"></td></tr> <tr><td name="contentS5" class="content"></td><td name="contentP5" class="content"></td><td name="contentN5" class="content"></td><td name="contentB5" class="content"></td><td name="contentE5" class="content"></td></tr> <tr><td name="contentS6" class="content"></td><td name="contentP6" class="content"></td><td name="contentN6" class="content"></td><td name="contentB6" class="content"></td><td name="contentE6" class="content"></td></tr> <!--<tr><td colspan="5" style="height:100px;"><input style="width:200px; height:80px; float:right; margin-right:100px; font-family:黑体; font-size:40px;" id="BtnBarCode" type="button" value="模具信息" /></td></tr>--> </table> </td> </tr> <tr> <td> </td> </tr> </table> </body> </html>