guys我试过这个window.open("FirstPage.html", "_self");
和window.open("FirstPage.html";"_self");
和window.location.href="FirstPage.html";
在同一个标签中打开第二页,但它什么都没有做......请帮忙? 这就是我称之为在javascript中打开同一个标签的页面firefox
function deleteCookie() {
setCookie("userdata"," ", 1);
setCookie("diff", " ", 1);
window.open('FirstPage.html';'_self');
}
,然后从onclcik
<button type="button" onclick="deleteCookie()">Forget Me</button></td>
你在iframe里面吗?你如何执行你的js? – 2015-02-05 17:32:47
@Teemu我编辑了帖子..请看看:) – 2015-02-05 17:38:58
但是你怎么称呼这个功能呢?从链接?从'onsubmit'处理程序?从'area' onclick。所有这些将阻止'window.location'工作,'open()'通常会在浏览器的弹出窗口阻止程序打开时失败。 – Teemu 2015-02-05 17:42:21