What function is used to get input from user and for displaying a message in box ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What function is used to get input from user and for displaying a message in box ?

25th Mar 2020, 7:12 PM
Sahil Pritwani
Sahil Pritwani - avatar
3 Answers
+ 1
Get data using prompt() function and displayed using alert() function. Like: var getData = prompt(); alert(getData); Also, can using innerHTML, document.write to display data in javascript.
25th Mar 2020, 7:38 PM
Mahmudul Hasan
Mahmudul Hasan - avatar
0
prompt and alert
2nd Jul 2022, 8:51 AM
Vindya Dilshini Wijewardhana
0
alert
5th Oct 2022, 7:01 AM
Manshaf Jamsith
Manshaf Jamsith - avatar