Reputation: 4059
i use struts2 like:
<s:a id="beforePage" disabled="true">beforePage</s:a>
but disabled doesn't work,it is the same as without disabled attirbute.
To my surprise,when i use jquery,like:
<s:a id="beforePage">beforePage</s:a>
$("#beforePage").attr("disabled","true");
the disabled attribute work! so,i'm confused on it.. please give me an explanation for that,thanks a lot.
Upvotes: 0
Views: 706
Reputation: 146
Struts2 <s:a>
tag finally generates html <a> tag. There is no "disabled" attribute defined in
tag (i.e.
` does not support disabled attribute). Hence it is not working.
Upvotes: 1
Reputation: 3526
The disabled attribute in the more recent versions of HTML is simply to exist in the element, like such, or as the attribute's value as well:
<s:a id="beforePage" disabled="disabled">beforePage</s:a>
Upvotes: 0