Javascript examples for jQuery Method and Property:attr
make a user script that changes every 'href' attribute of every element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.js"></script> <script type="text/javascript"> $(window).load(function(){/* w w w.j a va 2 s .c o m*/ $("[href]").attr("href", "http://java2s.com"); }); </script> </head> <body> <p> Test text <a href="http://stackoverflow.com">link</a> </p> </body> </html>