Issue
I need this "default text" in my CSS file, for example to an <input>
tag and to a <textarea>
,
so I search for something like:
<style>
testcss{
default:"DefaultText";
or
value:"DefaultText";
}
</style>
So, here is my question,
I have several <input>
in my form, and I need to set them all "same default value"! for example same "placeholter" ou same "value" and, I need this by CSS <style>
!
Solution
You can use javascript
var inputs = document.getElementsByTagName('input');
for (i = 0; i < inputs.length; i++) {
inputs[i].value = "Default Text";
}
Answered By - Munawir
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.