[HTML] Is it possible to put only one placeholder code to entire text box or you really have to put it one by one? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

[HTML] Is it possible to put only one placeholder code to entire text box or you really have to put it one by one?

Just asking because I have tons of textbox in my code and I forgot to put placeholder on each textbox. But the placeholder value is the same for the entire textbox

13th Jul 2018, 3:19 AM
Email Not Activated
7 Answers
13th Jul 2018, 3:33 AM
Calviղ
Calviղ - avatar
+ 3
Start learn ES6, latest version of JavaScript that every frameworks using (I don't think you could find frameworks using any jQuery there. Lol) There are 2 websites you could learn and master JavaScript. http://exploringjs.com/ http://javascript.info/
13th Jul 2018, 4:04 AM
Calviղ
Calviղ - avatar
+ 3
There are 2 websites you could learn and master JavaScript. http://exploringjs.com/ http://javascript.info/
13th Jul 2018, 11:09 AM
Honia Dana
Honia Dana - avatar
+ 2
Thank you for that! I got an idea from your code. No need to use for loop. I'll just call the class of the entire text box and add an attribute placeholder using jQuery. :D
13th Jul 2018, 3:35 AM
Email Not Activated
+ 2
It's not necessary you must use jQuery in your jQuery codes. You can mix it. Javascript now has better syntax, many codes are better write in vanilla JavaScript, some are shorter than jQuery codes, definitely with better performance. I have created hundreds of JavaScript codes on code playground without one use jQuery. 😁
13th Jul 2018, 3:40 AM
Calviղ
Calviղ - avatar
+ 2
Yes I know that it's not necessary to require use jQuery. 😁 I could also use pure JS only. :) By the way, is there a Vanilla JS course here? I'm interested to learn because you said it has better and shorter syntax than jQuery. 😮
13th Jul 2018, 3:48 AM
Email Not Activated
+ 2
Honia Dana Lol. You just copy the comment above. 😂😅
13th Jul 2018, 11:15 AM
Email Not Activated