使用php或java脚本或jquery在html页面上禁用所有超链接10秒


disable all hyperlink on html page for 10 second using php or java script or jquery

使用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>