Javascript examples for jQuery:String
Convert string values from variable to HTML in Javascript
<html> <head> <title>ChangeHTML</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.slim.js"></script> <script type="text/javascript"> window.onload=function(){//from ww w . j a va 2s. c o m document.getElementById("myName").innerHTML = "<h1>asdf?!</h1>"; } </script> </head> <body> <div id="myName"> <p>Hello~!</p> </div> </body> </html>