Javascript examples for jQuery Method and Property:removeAttr
Get Element By Class and add/remove attribute in JavaScript
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> <script type="text/javascript"> $(window).on('load', function() { $(function(){// www . j a v a2 s.c om $(".className").removeAttr("onclick style"); }); }); </script> </head> <body> <span onclick="test" style="color:blue;" class="className">testing</span> </body> </html>