0

Question to sololearn

what is the for a button to redirect me to other html file

26th Nov 2017, 7:23 AM
Surendra Rajawat
Surendra Rajawat - avatar
6 ответов
+ 3
To redirect the browser to another page or url you can use location in JavaScript, this is a raw example, and may not be a good one, and if you're running this in Code Playground you will be required to open browser to open the url. The button, placed in HTML section; <button onclick="jump();">Twitter for mobile</button> The script, placed in JS section; function jump() { window.location.href = " https://mobile.twitter.com/"; } Hth, cmiiw
26th Nov 2017, 9:01 AM
Ipang
+ 3
Hth : Hope that helps cmiiw : Correct me if I'm wrong
26th Nov 2017, 9:42 AM
Ipang
+ 2
You're welcome, glad to help :)
26th Nov 2017, 10:01 AM
Ipang
+ 2
You're welcome, glad to help :)
26th Nov 2017, 10:01 AM
Ipang
+ 1
thank you
26th Nov 2017, 9:59 AM
Surendra Rajawat
Surendra Rajawat - avatar
0
What is Hth,cmiiw
26th Nov 2017, 9:25 AM
Surendra Rajawat
Surendra Rajawat - avatar