<script type="text/javascript">
function dd(){
//document.getElementById ('zhang').getElementsByTagName ("a").href = "http://www.easyboor.com"
//document.getElementsByTagName("a").href="http://www.w3school.com.cn";
var cc = document.getElementById ('myAnchor').innerHTML
var aa = document.getElementById ('myAnchor').getElementsByTagName('a');
alert (aa[0].innerHTML);
aa[0].innerHTML= "易搏";
aa[0].href= "http://www.easyboor.com";
var aa = document.getElementsByTagName('a');
alert (aa[0].href);
}
</script>
<div id="myAnchor" onclick="dd()"><a href="http://www.easyboor.com" >易搏</a></div>
getElementsByTagName('标签') 获取的是一组A标签的数组所有要用过AA[0]来表示第一个。