Есть такой код:
<div class="field">
<input type="text" id ="email" name="email">
<label for="email" id="label_email">Введите Email</label>
</div>
<div class="field">
<input type="text" id ="namel" name="name">
<label for="name" id="label_name">Введите ваше имя</label>
</div>
<div class="field">
<input type="text" id ="country" name="country">
<label for="country" id="label_country">Введите страну</label>
</div>
<div class="field">
<input type="text" id ="city" name="city">
<label for="city" id="label_city">Введите город</label>
</div>
<script>
var input = document.getElementsByTagName('input;)
for (i = 0; i < input.length; i++) {
input.onclick???? . focus???? = function {
... Где-то там есть if (this.id = id инпута) {
то this.input и как-то выбрать следующий лейбл за ним.. чтоб он в заполненном поле не появлялся..
Нужно чтоб при получении фокуса, лейбл с поля инпута исчезал, конечно можно placeholderОМ сделать это, но там нюансы есть, и надо именно label в абсолютной позиции делать. Что-то запутался очень очень.. помогите пожалуйста сложить куски мозаики...
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
sergei8550
Есть такой код:
<div class="field">
<input type="text" id ="email" name="email">
<label for="email" id="label_email">Введите Email</label>
</div>
<div class="field">
<input type="text" id ="namel" name="name">
<label for="name" id="label_name">Введите ваше имя</label>
</div>
<div class="field">
<input type="text" id ="country" name="country">
<label for="country" id="label_country">Введите страну</label>
</div>
<div class="field">
<input type="text" id ="city" name="city">
<label for="city" id="label_city">Введите город</label>
</div>
<script>
var input = document.getElementsByTagName('input;)
for (i = 0; i < input.length; i++) {
input.onclick???? . focus???? = function {
... Где-то там есть if (this.id = id инпута) {
то this.input и как-то выбрать следующий лейбл за ним.. чтоб он в заполненном поле не появлялся..
Нужно чтоб при получении фокуса, лейбл с поля инпута исчезал, конечно можно placeholderОМ сделать это, но там нюансы есть, и надо именно label в абсолютной позиции делать. Что-то запутался очень очень.. помогите пожалуйста сложить куски мозаики...
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.