+ 1

what is used for getting input from the user

10th Aug 2020, 10:13 AM
omo daniel
omo daniel - avatar
3 odpowiedzi
+ 2
prompt() or you can use input tag ,go through the course again or look at one online tutorials and videos ,or be more specific if it didn't helped you :-)
10th Aug 2020, 10:16 AM
Abhay
Abhay - avatar
+ 1
var user=prompt("Enter your name"); alert(user); Paste this code in JavaScript section of code.
10th Aug 2020, 10:19 AM
shubham kumar
shubham kumar - avatar
+ 1
omo daniel dost if you are talking about html then, We will use form tag and inside it we used input tag. It is used to collect information from the user when we make website like registeration form or login/signup etc.. Or if you are talking about javascript then we used prompt () It is used to collect users age or anything and on that information if you are agree then you can show your webpage to them. Like you made some adult stuff then must used prompt () to asked user to enter age. If user enter 18+ then the website will displayed to the user else nothing will display. I hope you get it
10th Aug 2020, 12:49 PM
Himanshu Shah
Himanshu Shah - avatar