1.2.
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script language="JavaScript">
/**
* 改变超链接路径
* 改变超链接内容
*/
function updatea(){
var a = document.links;
a[0].href="http://www.baidu.com";
a[0].innerHTML="访问百度";
}
</script>
</head>
<body>
<a href="http://www.google.com">访问谷歌</a>
<input type="button" value="访问百度" οnclick="updatea()"/>
</body>