JavaScript中 的倒计时
<html>
<head>
<title></title>
</head>
<body>
<form id=aa name=aa>
<input type=button value="同意(10)" id=a1 disabled="disabled">
</form>
</body>
</html>
<script>
var num=10;
window.setTimeout("aa()",1000);
function aa()
{
num--;
if(num==0)
{
document.aa.a1.value="同意";
document.aa.a1.disabled="";
return;
}
document.aa.a1.value="同意("+num+")";
window.setTimeout("aa()",1000);
}
</script>
相关文档:
函数一、写cookie的函数,将Cookie写入客户端,通用函数,传入3个参数即可(Cookie名字,值和失效期)
//函数:写入cookie
function WriteCookie (cookieName, cookieValue, expiry)
{
var expDate = new Date();
if(expiry) //如果设置了cookie失效时间;
{
expDate.setTime (expDate.getTime() expiry);
documen ......
1、后退 前进
<input type="button" value="后退" onClick="history.go(-1)">
<input type="button" value="前进" onClick="history.go( 1 );return true;">
2、返回
<form><input type="button" value="返回上一步" onClick="history.back( ......
通过请求的header中可以看到 User-Agent 项
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Tablet PC 2.0; CIBA)
这里记录了本地信息,通过这里的.Net CLR xxxxx,可以判断 ......
public static void Main()
{
WebRequest req = WebRequest.Create("http://blog.csdn.net/xiaofengsheng");
try
& ......
方法1:
1function CheckSelect()
2 {
3 var tb = document.getElementById("ctl00_ContentPlaceHolder1_chkYear");
4
5 for(var i=0;i < tb.rows.length;i+ ......