javascript location href target _blank 1

javascript location href target _blank

        window.open('http://www.google.com', '_blank');

Here is what the above code is Doing:
1. We’re creating a new class called “Link” that inherits from the “Button” class.
2. We’re overriding the “on_press” method to open a new window in the browser.
3. We’re creating an instance of the “Link” class and adding it to the “root” widget.

Similar Posts