Hi :) new in this area, so do not blame me. Something like a player type, there is a PLAY button and when you press, it is replacing it -Pause. On the Internet found not one decision, but something basic and simple from what I tried, unfortunately, did not come up.

DIV Class= "Music-Box-2" >
a href= "#" id= "Play" class= "Musicicon PlayTest" >
/a >
/div >
Let PlayTest= Document.QuerySelector ('PlayTest');
Let Play= Document.getelementByid ('Play');
Play.AddeventListener ("Click", Function () {
  Document.playTest.Style.BackGroundImage= URL ('.. ImG /Pause.png');

Document.playTest.Style ► PlayTest.STyle (After all, PlayTest is a variable, not the property of the Document object). Well, the selector in the first line is wrong, there is not enough points before the class name ... I study the theory of CSS (methods querySelector [All], Matches, etc. -use CSS selectors).

yar852021-09-13 02:27:13

Classes and IDs, by the way, register-dependent ... Therefore, words in them are more often separated by a hyphens, such as Class= "Music-icon play-test" (well, like DIV in the example). And the code itself like norms, that is, it must earn if the specified errors fix.

yar852021-09-13 02:27:13