51help TIY
码:
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" tppabs="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("#w3s").attr({ "href" : "../jquery/index.htm"/*tpa=http://www.51help.tk/jquery/*/, "title" : "51help jQuery 教程" }); }); }); </script> </head> <body> <p><a href="../index.htm" tppabs="http://www.51help.tk/" id="w3s">51help.tk</a></p> <button>改变 href 和 title 值</button> <p>经改变的 href 置的 title 值。</p> </body> </html>
查看结果: