Hi I would like to replace all href and action attributes on a page with href="#" and action="#". Could someone point out where i am going wrong;
$(document).ready(function(){
var contents = $("body").html();
contents.replace( /href=[\"'][^'\"]*[\"']/g, 'href="#"' );
contents.replace( /action=[\"'][^'\"]*[\"']/g, 'action="#"' );
});
I would also like to do this without the use of jQuery but not sure how.