I have a <input>-element that needs 2 different id attributes. Is there a way to make it have 2 id attributes in one <input>? One id is for the CSS while the other id is for JavaScript.
How can i make this work? Here's an example of the code I'm trying to find a way to make it work.
<input type="button" id="button1" id="reset" value="Subscribe">
id="button1" is for the CSS, while id="reset" I need for JavaScript since a click of that button will make a number above the button go up. But I need a way to clarify to it that id="reset" is for the JavaScript, which is on the same page as the HTML is, and the CSS is on the same page as well, obviously using the style tags.
id. Use aclassfor the CSS instead.id="button1"to target your element with JavaScript.