我想在div标签中添加一个target属性(参见下面的代码),以便页面“index.html”在同一页面中打开,即target_self
<div id="home" style="cursor:pointer;
"href="javascript:void(0)"
onclick="window.open('index.html')"></div>
答案 0 :(得分:0)
您应该从window.open
更改为window.location.href =