-5
Abstracting: I don’t know about Javascript, but I know I can do what I want with Javascript. I would like to know how to check if an input is being clicked, and when it is, I would like to add css classes to other page elements.
How do I do that?
I found something that can help you: https://www.w3schools.com/jsref/event_onclick.asp
– Maury Developer
Will it be a single field? Or several?
– Risk
I want to click the input and add a background to the site
– Leonardo Henrique
Example:
<input type="number" onclick="myFunction()">
– Maury Developer
Your question is not clear in more detail than you want more exactly.
– hugocsl
I specifically want the effect that occurs when clicking on the https://www.shoptime.com.br/ search box where the background darkens
– Leonardo Henrique
Using the direct function call of the html <input onchange="function()"> is not appropriate. The most appropriate is to make javascript wait for event object.onclick = Function(){ its code};
– Risk