javascript - How to open a webpage in html without clicking a link/button -


before start new html , have limited programming experience i doing school project , need understand how this. have looked everywhere couldn't seem find answers came here.

i need know how html script open new webpage without external inputs (such pressing link). below few of simple things have tried open google using html.

this can done with:

window.location.href = "[url_here]"; 

no click event required, run line of code when want change url.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -