Javascript link to div by id - Javascript jQuery

Javascript examples for jQuery:Link

Description

Javascript link to div by id

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>st-01-table</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
  <script type="text/javascript">
    window.onload=function(){//from  ww w  .j  a v  a  2 s . com
var href = "https://www.java2s.com";
var tag = '<a href="'+href+'" target = "_blank">'+href+'</a>';
$("#releaseNotes").html(tag);
    }

      </script> 
 </head> 
 <body> 
  <div id="releaseNotes">
    hjghhghjghgh 
  </div>  
 </body>
</html>

Related Tutorials