如何在当前标签中打开新网址? - JAVASCRIPT

时间:2018-04-04 18:12:08

标签: javascript html

我尝试了很多不同的方法。但所有这些都导致在新标签中打开网址。使用javascript,我该怎么做?

(请不要jQuery,这是一个学校项目,我们还没有把jQuery作为一个教训)

这是我正在使用的功能:

function myFunction() {
            window.open('project.html', 'toolbar=0, location="_self", menubar=0');
            target = "_self";
            }

1 个答案:

答案 0 :(得分:1)

您正在寻找location property

t.start();a.foo(b);
相关问题