2 values to the button | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

2 values to the button

I want when i click on the it goes to sololearn page and says welcome + name

13th Jun 2018, 7:15 AM
Alieldien
Alieldien - avatar
3 Answers
+ 2
you can't do it with external page, to do that you should write on sololearn source code but you can alert and then redirect to sololearn
13th Jun 2018, 8:25 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 1
<button onClick="clicked()">Redirect Sololearn</button> <script> function clicked(){ alert("Welcome to Sololearn"); window.location="https://www.sololearn.com" } </script>
13th Jun 2018, 3:12 PM
Sudarshan Rai
Sudarshan Rai - avatar
0
Can you give me an example
13th Jun 2018, 1:37 PM
Alieldien
Alieldien - avatar