Show And Hide Picture With Javascript
RegisterLogin
Show And Hide Picture With Javascript
Post Description: Hiding And Showing A Picture Using Javascript Code Will Show You Example Of How You Can Hide Or Show A Picture Image When You Click Ona Link
Tags: Show, And, Hide, Picture, With, Javascript
This Post Was Posted On Dec 20, 2009 By Webune Tutorials #2932
Post Description: Hiding And Showing A Picture Using Javascript Code Will Show You Example Of How You Can Hide Or Show A Picture Image When You Click Ona Link
Tags: Show, And, Hide, Picture, With, Javascript
This Post Was Posted On Dec 20, 2009 By Webune Tutorials #2932
Show And Hide Picture With Javascript by Webune Tutorials
We provide web hosting to people just like you who are just beginning to program their websites. We provide excellent support service, that is why we have created this post to show you how you can make a picture shows when you click on a link
the best way to learn is by example, take a look a this example:
now you probably want to know who we did it, we used the following HTML, CSS and JAVASCRIPT code to make it happen
<script language="javascript">
<!--
// PLEASE DO NOT REMOVE THIS. THANKS
// FIND GREATE JAVASCRIPT CODES AT http://www.webune.com
var state = 'hidden';
function Show_Picture(layer_ref) {
if (state == 'visible') {
state = 'hidden';
}else {
state = 'visible';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
}
if (document.getElementById && !document.all) {
Webune_Form = document.getElementById(layer_ref);
Webune_Form.style.visibility = state;
}
}
//-->
</script>
<!-- HIDDEN INFORMATION TO BE SHOWN ONCLICK -->
<div id="Layer1" style=" visibility:hidden;">
<img src="http://www.webune.com/images/headers/default_logo.jpg" border="0" />
</div>
<!-- END - HIDDEN INFORMATION TO BE SHOWN ONCLICK -->
<div><a href="javascript://" onclick="Show_Picture('Layer1');">Click HERE To Show and Hide Picture</a></div>
as you can see, when you click on the link, it shows or hides the picture of our logo
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
canada1
#3538 1
wow, i really like this hide me, show me javascript code
Mar 01, 2010 Reply Report abuse
©2011 Webune Forums - Mon Dec 26, 2011 7:32 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3