JavaScript is the most popular programming language in the world.
This page contains some examples of what JavaScript can do in HTML.
The HTML DOM (the Document Object Model) is the official W3C standard for accessing HTML elements.
You can use JavaScript to:
Change HTML elements
Delete HTML elements
Create new HTML elements
Copy and clone HTML elements
Click above.....
I will show How it Works......
Here is the source code....
<!DOCTYPE html>
<html>
<body>
<script>
function changeImage() {
var image = document.getElementById('myImage');
if (image.src.match("2031"))
{
image.src = "IMG_2032.jpg";
} else
{
image.src = "IMG_2031.jpg";
}
}
</script>
<img id="myImage" onclick="changeImage()" src="IMG_2031.jpg" width="700" height="380">
<p>Click the Picture to see the Next one</p>
</body>
</html>
Change the bolded words with your image link and find out how it works.....
I will show How it Works......
Here is the source code....
<!DOCTYPE html>
<html>
<body>
<script>
function changeImage() {
var image = document.getElementById('myImage');
if (image.src.match("2031"))
{
image.src = "IMG_2032.jpg";
} else
{
image.src = "IMG_2031.jpg";
}
}
</script>
<img id="myImage" onclick="changeImage()" src="IMG_2031.jpg" width="700" height="380">
<p>Click the Picture to see the Next one</p>
</body>
</html>
Change the bolded words with your image link and find out how it works.....
I am definitely enjoying your website. You definitely have some great insight and great stories. ้่ไปฃๅ
ReplyDeleteI can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all,.. kiss anime
ReplyDelete