实现脚本如下:
<script type="text/javascript">
<!--//
function goTo()
{
var newA = document.createElement("a");
newA.id='gg'
newA.target='_blank';
newA.href='http://www.google.com';
document.body.appendChild(newA);
newA.click();
document.body.removeChild(newA);
}
//-->
</script>
<a href="#" onclick="goTo()" >click me</a>