javascript placeholder code example
Example 1: css style placeholder
input::-webkit-input-placeholder {
}
input::-ms-input-placeholder {
}
input:-ms-input-placeholder {
}
input::-moz-placeholder {
opacity: 1;
}
input:-moz-placeholder {
opacity: 1;
}
input::placeholder {
}
Example 2: json placeholder
fetch('https://jsonplaceholder.typicode.com/todos/1')
.then(response => response.json())
.then(json => console.log(json))
Example 3: set placeholder javascript
document.querySelector('.gfield_list_cell.gfield_list_72_cell3 input').setAttribute('placeholder','$');