javascript - jQuery replace/remove attribute without id or tag -
i new jquery, , i'm having trouble doing thought should simple find , replace operation.
i want remove disabled attribute. searching jquery remove sample, using id or tag.
<td><a href="xx.html" disabled onclick="preparexform(this,'xx')" class="btn">ok</a> </td>
i try code not working.
$("body *").replacetext( /disabled|disable/gi, "enable" );
use selector on attribute , remove when found. way never idea try use regex/replace on html tags
$("a[disabled]").each(function() { $(this).removeattr("disabled"); });
Comments
Post a Comment