<button onclick="showContent()">نمایش محتوای مخفی</button> <template> <h2>گل</h2> <img src="https://www.bubbleslearn.ir/wp-content/uploads/2021/07/img_white_flower.jpg" width="214" height="204"> </template> <script> function showContent() { var temp = document.getElementsByTagName("template")[0]; var clon = temp.content.cloneNode(true); document.body.appendChild(clon); } </script>