Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function inputState(id) {
- window.formElementsPath = document.getElementById['contact-form'].elements;
- if (id == 1 && formElementsPath['name'].value == nameHint) {
- formElementsPath['name'].style.color = '#000';
- formElementsPath['name'].value = e;
- }
- else if (id == 2 && formElementsPath['name'].value == e) {
- formElementsPath['name'].style.color = hintColor;
- formElementsPath['name'].value = nameHint;
- }
- else if (id == 3 && formElementsPath['email'].value == emailHint) {
- formElementsPath['email'].style.color = '#000';
- formElementsPath['email'].value = e;
- }
- else if (id == 4 && formElementsPath['email'].value == e) {
- formElementsPath['email'].style.color = hintColor;
- formElementsPath['email'].value = emailHint;
- }
- else if (!id) {
- formElementsPath['email'].value = emailHint;
- formElementsPath['name'].value = nameHint;
- }
- }
Add Comment
Please, Sign In to add comment