<html>
<head>
<script>
function changeLink()
{
document.getElementById('myAnchor').innerHTML="自强学堂";
document.getElementById('myAnchor').href="/";
document.getElementById('myAnchor').target="_blank";
}
</script>
</head>
<body>
<a id="myAnchor" href="http://www.microsoft.com">微软官方网站</a>
<input type="button" onclick="changeLink()" value="改变链接">
</body>
</html>