Hide and unhide a text after 6 seconds in a infinite loop (Html)
问题 Hi i have created this script to hide a text after 6 seconds, But I want that the text must reappear and disappear again back to the infinite every 6 seconds how I can create this kind of HTML script? <h1 style="text-align: left;" id="xhide">Hello World</h1> <script type="text/javascript"> function hide(id) { d= document.getElementById(id) d.setAttribute('style','display:none;') } setTimeout(function () { hide('xhide') }, 6000); </script> 回答1: You can try updated code as per your need: <h1