Tuesday, 27 August 2013

How to clear the text in the address bar?

How to clear the text in the address bar?

I am creating a custom new tab page, and I want links to localhost and my
router. It seems if I want to link to one of these it just appends it to
the existing text in my address bar, instead of clearing it like it does
for http:// links.
$('#router').on('click', function() {
window.open("192.168.1.1");
});
This is the address it opens:
file:///C:/Users/brennan/development/new_tab/192.168.1.1
instead of just:
192.168.1.1

No comments:

Post a Comment