Update <LI> text - Javascript jQuery

Javascript examples for jQuery:Select Dropdown

Description

Update <LI> text

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.0.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//from   w ww. ja  v  a  2  s  .  c  o m
var today = new Date();
var cptext = "&copy; 2011-" + today.getFullYear().toString() + " MyCompany";
$('#cp').html(cptext);
    });

      </script> 
 </head> 
 <body> 
  <li id="cp"> MyCompany</li>  
 </body>
</html>

Related Tutorials