javascript:void(0)
刚开始都不知道是啥意思
其实就是一个死链接,什么事情都不做。
<a id="link_${user.account}" href="javascript:void(0);" οnclick="changSubmit();" style="cursor:pointer;height:25px;width:60px;margin-top:10px;">发送email</a>
这句话中的javascript:void(0) 就是一个死链接,什么事情都没做,主要的还是onclick事件。
常见的几种链接
1.window.open(''url'')
2.用自定义函数
<script>
function openWin(tag,obj)
{
obj.target="_blank";
obj.href = "Web/Substation/Substation.aspx?stationno="+tag;
obj.click();
}
</script>
<a href="javascript:void(0)" οnclick="openWin(3,this)">株洲</a>
window.location.href="";