Home > front end >  The multiple ID how to write the link
The multiple ID how to write the link

Time:09-20



OnClick="document. The getElementById (' link ')


The object is & lt; Div id="link" style="margin: 5 px; Display: none;">


I want to use the link more than consult how to write the link ID

CodePudding user response:

To the class

CodePudding user response:

How to change? ?

CodePudding user response:

HTML tags are not allowed to have multiple id name, change the id name to the name of the class class, by the name of the class to get the document. The getElementByClassName (' link ') or the document. QuerySelectorAll (" link ")
  • Related