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

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -

javascript - How to change image src on success AJAX -