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 www.w3schools.com/tryit but whenever i move it to another editor like https://html5-editor.net/ 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='http://bit.ly/2FlR6Zg on the light</button>

<img id="myImage" src="http://bit.ly/2Ne2mNR" style="width:600px">

<button onclick="document.getElementById('myImage').src='http://bit.ly/2FmPpL1 off the light</button>

</body> </html>

thanks!:)

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

from web_design http://bit.ly/2N0L6eD
via IFTTT

No comments:
Write Your Comments

Ready Monetized Blogger Gaming Website