H
harksky
Unregistered / Unconfirmed
GUEST, unregistred user!
有一段javascript代码::
<script language="JavaScript">
<!-- Begin
var iMins = 0;
var iSecs = 0;
var gross = 0;
function stopwatch() {
gross++;
if ((gross % 60) == 0) {
iMins = gross / 60;
}
iSecs = gross - iMins * 60;
var sMins ="" + ((iMins > 9) ? iMins : "0" + iMins);
var sSecs ="" + ((iSecs > 9) ? iSecs : "0" + iSecs);
document.form1.timespent.value = sMins + ":" + sSecs;
//十五分钟暂停计时
if ((gross % 900) == 0) {
if (!confirm("是否继续?") {
return false;
}
}
window.setTimeout("stopwatch()",1000);
}
每隔15分钟便会弹出消息框进行确认.
1/用Delphi如何实现自动点击消息窗口中"确认"按钮???
2/如何防止webbrowser1被javascipt关闭??
<script language="JavaScript">
<!-- Begin
var iMins = 0;
var iSecs = 0;
var gross = 0;
function stopwatch() {
gross++;
if ((gross % 60) == 0) {
iMins = gross / 60;
}
iSecs = gross - iMins * 60;
var sMins ="" + ((iMins > 9) ? iMins : "0" + iMins);
var sSecs ="" + ((iSecs > 9) ? iSecs : "0" + iSecs);
document.form1.timespent.value = sMins + ":" + sSecs;
//十五分钟暂停计时
if ((gross % 900) == 0) {
if (!confirm("是否继续?") {
return false;
}
}
window.setTimeout("stopwatch()",1000);
}
每隔15分钟便会弹出消息框进行确认.
1/用Delphi如何实现自动点击消息窗口中"确认"按钮???
2/如何防止webbrowser1被javascipt关闭??