Answers for "html empty elements"

0

empty elements in html

<script>
  function func(){
   document.getElementById('div').innerHTML=''
  }
</script>

<button onclick='func()'>Click</button>
<div id="div">
  This disappears
</div>
Posted by: Guest on June-16-2021

Browse Popular Code Answers by Language