It is necessary that the submit button changes its backing when the mouse is moved. The style inside the tag is fundamental, so I can’t do it through hover.
With this code, there is no reaction. What am I doing wrong?

<input type="submit" value=" " class="*Π½Π°Π·Π²Π°Π½ΠΈΠ΅ класса*" style="background: url(*ссылка Π½Π° ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ*); width: *px; height: *px; border: none;" onmouseover="this.src='*ссылка Π½Π° ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ*'" onmouseout="this.src='*ссылка Π½Π° ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ*'"> 

    1 answer 1

    this in this handler is an html element, in this case, input with the type of submit . The input element has no src property.

    But he has: style , which already has a background .

    Thus, the code should look like this:

     onmouseover="this.style.background='url(*ссылка Π½Π° ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ*)'" 

    Important: if the path is framed with quotes, they must be escaped with a backslash, for example: url(\"path/to/image\")

    • Thanks a lot! Happened. Now I know. - Kira