使用php或java脚本或jquery禁用html页面上的所有超链接10秒
$("input").prop('disabled', true);
$("input").prop('disabled', false);
您可以使用setTimeout函数。有关更多详细信息(http://www.sitepoint.com/settimeout-example/)
setTimeout("$(a).attr('disabled',true);",3000);
使用jquery非常容易。将此块复制到页首
此示例禁用submit/reset/button
的所有链路(<a...>
)和input
标签。
<head>
...
<script type="text/javascript" src="/path/to/jquery.js"></script>
<script type="text/javascript">
$(function() {
// at start disable...
$("a,input[type=button|reset|submit],button").prop("disabled", true);
setTimeout(function() {
// after 10 seconds...
$("a,input[type=button|reset|submit],button").prop("disabled", false);
}, 10000);
});
</script>
</head>