title: I want to display text when I move mouse over image in JavaScript
body: <p>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.</p>
  
  <pre><code>&lt;script&gt;
  function show()
  {
  var welcome = document.getElementById('sub1');
  welcome.style.display = 'block';
  }
  
  function hide()
  {
   var welcome = document.getElementById('sub1');
   welcome.style.display = 'none';
  }   
  &lt;/script&gt;
  
  &lt;div id="sub1" onmouseover="show();" onmouseout="hide();"&gt; &lt;/div&gt;
  
   //This is the image where I want to display a text.
  &lt;td&gt;&lt;img border="0" src="images/img1.jpg"
  alt="iphone 5s" width="304" height="228"&gt;&lt;/td&gt;
  </code></pre>