+ 2

How to use <script> tag to create a pop up for a website ??

I want to know how can we use <script> tag in html to create a pop up which ask the name and email id of a visitor who opens the website.... Pls tell me...

7th Oct 2019, 12:34 PM
Komal Negi
Komal Negi - avatar
2 odpowiedzi
+ 2
<script> var name = prompt("What's your name"); var email_id = prompt("What's your e-mail id: "); alert("Your name is "+name+". And your email id is "+email_id); </script>
7th Oct 2019, 11:14 PM
Anthony Kwesi Saah
Anthony Kwesi Saah - avatar
+ 1
And where can we use this code in our html code pls tell me that also.. ?? And where the data will get stored ??or not ??am confused...
8th Oct 2019, 3:05 AM
Komal Negi
Komal Negi - avatar