Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

add variable in innerhtml

<body>
  <div id="app"></div>
  
  <script>
    const app = document.getElementById('app');
    
    let content = "<div>This is the main content<button>click me!</button></div>";
    app.innerHtml = content;
  </script>
</body>
 
PREVIOUS NEXT
Tagged: #add #variable #innerhtml
ADD COMMENT
Topic
Name
1+1 =