<div onclick="window.open('www.baidu.com')">在新窗口跳转至百度</div>
<div onclick="window.open('www.baidu.com','_self')">在当前窗口跳转至百度</div>
2.通过window.location.href函数
<div onclick="window.location.href= 'www.baidu.com';return false">在当前窗口跳转至百度</div>
css
cursor: pointer