88
rated 0 times
[
95]
[
7]
/ answers: 1 / hits: 22804
/ 8 Years ago, fri, february 26, 2016, 12:00:00
I want to display text when I move mouse over image in JavaScript. I don't know where I am going as I am new to this.There is a table which has images I want to display its content when I move mouse over image . I want to use JavaScript here.
<script>
function show()
{
var welcome = document.getElementById('sub1');
welcome.style.display = 'block';
}
function hide()
{
var welcome = document.getElementById('sub1');
welcome.style.display = 'none';
}
</script>
<div id=sub1 onmouseover=show(); onmouseout=hide();> </div>
//This is the image where I want to display a text.
<td><img border=0 src=images/img1.jpg
alt=iphone 5s width=304 height=228></td>
More From » jquery