Click me

For the above...

In the head section of the page write...

<script type="text/javascript">
function inner(){
document.getElementById('inner').innerHTML = "<img src='bkg62.jpg'>"
}
</script>


For where you want the image to appear in the body section write...

<div id="inner">
</div>


For the "click me" text in the body section write...

<a href="javascript:inner()">Click me</a>

Click me

For the above...

In the head section put...

<script type="text/javascript">
function showme(){
document.getElementById("hideme").style.display="block";
}
</script>


and the style...

<style type="text/css">
#hideme{
display:none;
}
</style>


In the body section, where you want the image to appear put

<p id="hideme"><img src='bkg62.jpg' /></p>

In the body section where you want the text to appear put...

<a href="javascript:showme()">Click me</a>


This page was written for naj_hcirnov at Yahoo Answers


GoStats stats counter