-1

I have tried a lot of different methods. But all of them lead to the url opening in a new tab. Using javascript, how can i do this?

(no jQuery please, this is a school project and we haven't had jQuery as a lesson yet)

this is the function i'm working with:

function myFunction() {
            window.open('project.html', 'toolbar=0, location="_self", menubar=0');
            target = "_self";
            }
G_ Sanster
  • 23
  • 2
  • 6

1 Answers1

1

You're looking for the location property:

location = ...;
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964