when I pressed text input, I want to change the background color of the input, but with javascript.
I know using css.
I want for example.
<form action="" name="abc" method="post"> <input name="abc" id="name" type="text"/> <input name="yusuf" type="text"/> <input type="submit"/> </form>
How can I select element name as name using javascript?
I want to look like:
<script> document.getElementById("name").style = "background-color:red"; </script>
I want to write css code, but directly. Soon, how can I achieve style = "" parameters?
source share