...
|
...
|
@@ -10,46 +10,48 @@ |
|
|
|
|
|
<ul>
|
|
|
<li>
|
|
|
<label>摄像头:</label>
|
|
|
<input id="cameraCode" type="text"/>
|
|
|
</li>
|
|
|
<li>
|
|
|
计时 : <input id='txt' type='text'/>
|
|
|
<label>计 时:</label>
|
|
|
<input id="txt" type="text" class="easyui-textbox" style="width:150px"/>
|
|
|
</li>
|
|
|
<li>
|
|
|
时长 : <input id='total' type='text'/>
|
|
|
<label>时长:</label>
|
|
|
<input id="txt" type="text" class="easyui-textbox" style="width:150px"/>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<script type="text/javascript">
|
|
|
$(function () {
|
|
|
var c = 0
|
|
|
var t
|
|
|
if (t) {
|
|
|
clearTimeout(t);
|
|
|
}
|
|
|
function timedCount() {
|
|
|
document.getElementById('txt').value = c
|
|
|
c = c + 1
|
|
|
t = setTimeout("timedCount()", 1000)
|
|
|
}
|
|
|
var c = 0
|
|
|
var t
|
|
|
if (t) {
|
|
|
clearTimeout(t);
|
|
|
}
|
|
|
function timedCount() {
|
|
|
document.getElementById('txt').value = c
|
|
|
c = c + 1
|
|
|
t = setTimeout("timedCount()", 1000)
|
|
|
}
|
|
|
|
|
|
var totalVar;
|
|
|
var totalVar;
|
|
|
|
|
|
function stopCount() {
|
|
|
var endTime = $('#endTime').val();
|
|
|
var startTime = $('#startTime').val();
|
|
|
var secondVar = parseInt((endTime - startTime) % 60);
|
|
|
if (endTime - startTime > 60) {
|
|
|
var minuteVar = parseInt((endTime - startTime) / 60);
|
|
|
totalVar = minuteVar + '分' + secondVar + '秒';
|
|
|
} else {
|
|
|
totalVar = secondVar + '秒';
|
|
|
}
|
|
|
|
|
|
c = 0;
|
|
|
setTimeout("document.getElementById('total').value=totalVar", 0);
|
|
|
clearTimeout(t);
|
|
|
function stopCount() {
|
|
|
var endTime = $('#endTime').val();
|
|
|
var startTime = $('#startTime').val();
|
|
|
var secondVar = parseInt((endTime - startTime) % 60);
|
|
|
if (endTime - startTime > 60) {
|
|
|
var minuteVar = parseInt((endTime - startTime) / 60);
|
|
|
totalVar = minuteVar + '分' + secondVar + '秒';
|
|
|
} else {
|
|
|
totalVar = secondVar + '秒';
|
|
|
}
|
|
|
|
|
|
c = 0;
|
|
|
setTimeout("document.getElementById('total').value=totalVar", 0);
|
|
|
clearTimeout(t);
|
|
|
}
|
|
|
$(function () {
|
|
|
$.ajax({
|
|
|
contentType: "application/json",
|
|
|
dataType: "json",
|
...
|
...
|
|