Home > front end >  Rearranging asked, document. The class instead of the getElementById?
Rearranging asked, document. The class instead of the getElementById?

Time:09-20


Because want to use more than one page, the link is only one, how to change the class to change


Function: it is time to choose form all hidden xu field pop-up xu field form

Help me to write two complete




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --






.

CodePudding user response:

Document. QuerySelector (' # link) setAttribute (' class ', 'link');

CodePudding user response:



Help me to write two complete bai



CodePudding user response:





[! - xu -]





[! - xu -]





[! - xu -]



CodePudding user response:

Back: the sky waves

How to identify the object? Is the same link


[! - xu -]

CodePudding user response:

reference 4 floor hldz88 response:
back: the sky waves

How to identify the object? Is the same link


[! - xu -]
element according to the event and the relative position of the target element on the page to identify, such as
This. ParentNode. ParentNode. ParentNode. GetElementsByClassName (' link ') [0]
Is access to the current event element is the parent of the parent element's parent element in the first Class for the link element,

CodePudding user response:

How do you write that the

Three to a page with different
  • Related