Posts by TheDailyCoding • 113 points
2 posts
-
1
votes2
answers104
viewsA: How do you put a sentence inside a form field and it disappears when you click inside the field?
You can use the placeholder, as stated, or use js and clear the field whenever you click on it. <input type="text" id="input" value="Value" onClick="func()"/> <script> var func=…
-
10
votes3
answers2257
viewsQ: Which loop is faster in C: while or for?
Being a bond while and a for that run the same number of times, which is faster? Example: while: int i = 0; int max = 10; while(i<max){ funcao(); i++; } for: int i; int max = 10; for(i=0;…