how to use input tags using Java script? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 5

how to use input tags using Java script?

i don't know how to use this tag Range Time Week File Datetime-local date color . Java Script using

16th May 2017, 8:04 AM
आदित्य मद्धेशिया
आदित्य मद्धेशिया - avatar
3 ответов
+ 2
I prepared an example of each of the tags here: https://code.sololearn.com/Wc0U2Vw0uHu9/#html Hope it will help.
16th May 2017, 9:32 AM
Krzysztof Przybylowski
Krzysztof Przybylowski - avatar
+ 1
<form>   My favorite color:   <input type="text" name="favcolor"> </form> Let's get this form as example. It's an input named as "favcolor". We need to declare the type of the input: Using type="text" this input is is set as a text box. HTML5 added several new input types and the reason is instead you write your favorite color as a text you can just pick it using type="color". This goes the same way to the other new inputs: The <input type="date"> depending on browser support, a date picker can show up in the input field. The <input type="tel"> is used for input fields that should contain a telephone number. See more at W3C: https://www.w3schools.com/html/html_form_input_types.asp
16th May 2017, 9:25 AM
Felipe Cruz
Felipe Cruz - avatar
+ 1
<form action="/action_page.php" method="get"> Range <input type="range" name="points" min="0" max="10"> </form> <form> Time: <input type="time" name="usr_time"> </form> <form> Week: <input type="week" name="week_year"> </form> <form action="/action_page.php"> File <input type="file" name="name" accept="image/*"> </form> <form> Datetime-local: <input type="datetime-local" name="bdaytime"> </form> <form> Date: <input type="date" name="bday"> </form> <form> Color: <input type="color" name="favcolor"> </form> source: www.w3schools.com
16th May 2017, 9:32 AM
Krzysztof Przybylowski
Krzysztof Przybylowski - avatar