Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

The element.InnerHTML Property

<box>
  <p>Hello there!</p>
</box>
 
<script>
  const box = document.querySelector('box');
  // Outputs '<p>Hello there!</p>':
  console.log(box.innerHTML)
  // Reassigns the value:
  box.innerHTML = '<p>Goodbye</p>'
</script>
Source by www.codecademy.com #
 
PREVIOUS NEXT
Tagged: #The #Property
ADD COMMENT
Topic
Name
2+8 =