<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> </title>
</head> <body>
<form id="form1" name="form1" method="post" action="">
<input type="submit" name="Submit" onclick="updateinfo(); "/>
</form>
<script language="javascript"> document.form1.Submit.disabled = ""; var speed = 1000; //速度
var wait = 10; //停留时间 function updateinfo(){
document.form1.Submit.disabled = true; if(wait == 0){
document.form1.Submit.value = "打印PDF";
document.form1.Submit.disabled = false;
wait=10;
}
else{
document.form1.Submit.value = "稍后打印"+wait;
wait--;
window.setTimeout("updateinfo()",speed);
}
}
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> </title>
<script language="javascript"> var speed = 1000; //速度
var wait = 10; //停留时间
function updateinfo(){
document.form1.Submit.disabled = true;
if(wait == 0){
document.form1.Submit.value = "打印PDF";
document.form1.Submit.disabled = false;
}else{
document.form1.Submit.value = "稍后打印"+wait;
wait--;
window.setTimeout("updateinfo()",speed);
}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<input type="submit" name="Submit" value="打印PDF" onclick="updateinfo()" />
</form> </body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> </title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<input type="button" name="btnPrint" id="btnPrint" onClick="setState(true);" value="打印PDF" />
</form>
<script language="javascript">
function $(id){
return document.getElementById(id);
}
function setState(value){
$("btnPrint").disabled = value;
updateinfo();
} var speed = 1000; //速度
var wait = 10; //停留时间
function updateinfo(){
if(wait == 0){
$("btnPrint").value = "打印PDF";
$("btnPrint").disabled = false;
wait = 10;
}
else{
$("btnPrint").value = "稍后打印" + wait;
wait--;
window.setTimeout("updateinfo()",speed);
}
}
</script>
</body>
</html>