為什么我這鏈接還可以使用呢?
<!DOCTYPE html>
<html>
? ? <head>
? ? ? ? <title>*選擇器</title>
? ? ? ? <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
? ? </head>
? ??
? ? <body>
? ? ? ? <form action="#">
? ? ? ? <input id="Button1" type="button" value="button" />
? ? ? ? <input id="Text1" type="text" />
? ? ? ? <input id="Radio1" type="radio" />
? ? ? ? <input id="Checkbox1" type="checkbox" />
? ? ? ? </form>
? ? ? ? <div>
? ? ? ? ? ? <p>段落</p>
? ? ? ? ? ? <div>div</div>
? ? ? ? ? ? <a target="_black">鏈接</a>
? ? ? ? </div>
? ? ? ??
? ? ? ? <script type="text/javascript">
? ? ? ? ? ? $("form *").attr("disabled", "true");
? ? ? ? ? ? $("div *").attr("disabled", "true");
? ? ? ? </script>
? ? </body>
</html>
2016-05-10
disabled 屬性規(guī)定應(yīng)該禁用 input 元素。對于input其他元素?zé)o效
2016-05-10
$("a").removeAttr("onclick") 讓他不能點擊就行了要是想改變顏色就 $("a").removeAttr("onclick").css("color","#ddd")