Timer控件在Web页上的应用? 用javascript好了<input type=button onclick="javascript:settimeout('document.form1.textbox.value=\"奔跑\:',10000);"差不多这样,没有验证正确 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ASP.NET的Timer组件,是在服务器上运行的在客户端页面上,还是用javascript来实现 <HTML><BODY><INPUT type=button onclick="computertime()" value="同意 (10 秒后继续)" name=agreeb><SCRIPT language=javascript><!--var secs = 10;function computertime(num){num=secs;document.all('agreeb').disabled=true;for(i=1;i<=secs;i++) { window.setTimeout("update(" + i + ")", i * 1000);}}function update(num) { if(num == secs) { document.all('agreeb').value =" 同意"; document.all('agreeb').disabled=false; document.all('textfield').value='时间到了!' }else { printnr = secs-num; document.all('agreeb').value = "同意 (" + printnr +" 秒后继续)"; }}//--></SCRIPT><input type="text" name="textfield"></BODY></HTML> callid=settimeout("fun()",1000)cleartimeout(callid)callid=setinterval("fun()",1000)clearinterval callid 一个解决方案中asp.net web项目调用vsto项目的问题! 怎样使用Eval函数计算两列的积 ?比如有单价和数量列(数据库),界面显示它们的积 为什么我的服务器上的数据库每隔一段时间就丢失了 如何实现验证用户名密码大小写?? 大家有没有在一个系统中支持多个类型的数据库 如何在ASP.NET下弹出保存文件的对话框? 一个简单的问题? 创建asp.net项目时的问题。 如何获得herf后面URL值,要求使用正则表达式 如何给脚本语言里的方法传数组??? 如何在程序里执行另外一个asp文件,而本页面不发生跳转 ASP.net(VS.net )里有没有treeview控件啊,在哪儿啊?
在客户端页面上,还是用javascript来实现
<BODY>
<INPUT type=button onclick="computertime()" value="同意 (10 秒后继续)" name=agreeb>
<SCRIPT language=javascript>
<!--
var secs = 10;
function computertime(num)
{
num=secs;
document.all('agreeb').disabled=true;
for(i=1;i<=secs;i++) {
window.setTimeout("update(" + i + ")", i * 1000);
}
}
function update(num) {
if(num == secs) {
document.all('agreeb').value =" 同意";
document.all('agreeb').disabled=false;
document.all('textfield').value='时间到了!'
}
else {
printnr = secs-num;
document.all('agreeb').value = "同意 (" + printnr +" 秒后继续)";
}
}//-->
</SCRIPT>
<input type="text" name="textfield">
</BODY></HTML>
cleartimeout(callid)
callid=setinterval("fun()",1000)
clearinterval callid