How to accept JavaScript USER INPUT in 5 minutes
Channel | Publish Date | Thumbnail & View Count | Download Video |
---|---|---|---|
Publish Date not found | 0 Views |
00:00:00 Introduction
00:00:19 Window prompt
00:01:36 HTML text field
00:00:19 Window prompt
00:01:36 HTML text field
// How to accept user input
// 1. EASY WAY window prompt
// 2. PROFESSIONAL METHOD HTML text box
// ————————- EASY OPTION ————————-
// let username window.prompt(/"What is your username?/");
// console.log(username);
// ——————— PROFESSIONAL TYPE ———————
let username;
document.getElementById(/"mySubmit/").onclick function(){
Username document.getElementById(/"myText/").value;
document.getElementById(/"myH1/").textContent Hello {username}
}
Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.