模拟超链接
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
<span href="http://www.baidu.com/">baudu</span>
<script type="text/javascript">
var span=document.getElementsByTagName("span")[0];
var href=span.getAttribute("href"); //获取该元素的href属性值
span.onclick=function(){ //定义鼠标单击事件处理函数
window.location=href; //装载URL
}
</script>