0
禁止使用PHP或Java腳本或jQuery的禁止使用PHP或Java腳本或jQuery的
$("input").prop('disabled', true);
$("input").prop('disabled', false);
禁止使用PHP或Java腳本或jQuery的禁止使用PHP或Java腳本或jQuery的
$("input").prop('disabled', true);
$("input").prop('disabled', false);
您可以使用的setTimeout功能10另一個HTML網頁上的所有超鏈接的HTML網頁上的所有超鏈接10秒。 (「$(a).attr('disabled',true);」,3000);
使用jquery很容易。將該塊複製到頁面的頭部。
本示例禁用submit/reset/button
(s)的所有鏈接(<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>
PHP是服務器側....所以使用JavaScript/jquery的 – donald123 2014-09-25 08:50:15
使用的setTimeout jQuery中。你想禁用什麼條件(onload/onclick/hover)? – Sam1604 2014-09-25 08:52:00
爲什麼你在你的例子中放?你是不是指? – fast 2014-09-25 08:52:38