Ready Monetized Wordpress Website

Thursday, June 20, 2019

[HELP] How come my code works on some HTML editors but not others?

Hey, I'm working on using code to make an image which can be changed with the click of the button, using HTML.

I wrote something that works on but whenever i move it to another editor like for example it stops working.

This is my code right now, sorry if it's pretty shabby I'm very very very very new to HTML:

<html> <body>

<button onclick="document.getElementById('myImage').src=' on the light</button>

<img id="myImage" src="" style="width:600px">

<button onclick="document.getElementById('myImage').src=' off the light</button>

</body> </html>


submitted by /u/delicious_water
[link] [comments]

from web_design

No comments:
Write Your Comments

Ready Monetized Blogger Gaming Website