解决方法:
<a href="javascript:void(0)" onclick="redirect(this,'../index.html')">Redirect</a>
function redirect(self, url) { // 这句主要是防止用户可以看到跳转链接和页面置顶 self.setAttribute('href', '###'); window.location.href = url; }