Display HTML special characters stored in JavaScript string - Javascript jQuery

Javascript examples for jQuery:String

Description

Display HTML special characters stored in JavaScript string

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.3.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){/* www .  ja v a2  s  .  c o  m*/
$('#result').text('\xfc');
    });

      </script> 
   </head> 
   <body> 
      <div id="result"></div>  
   </body>
</html>

Related Tutorials