javascript - Disabling an iframe in a spoiler -


i've got question concerning html, iframes. english not native language , i'm kinda bad @ html, please have mercy (:

so: have spoiler using tag:

 <script type="text/javascript">       function spoiler() {         var st = document.getelementbyid('spoiler').style;         st.display = (st.display == 'none' || st.display == '') ? 'block' : 'none';       }     </script> <input value="open" onclick="spoiler();" type="button" />      <p id="spoiler" style="display:none;">             iframe     </p> 

the iframe chatbox, want disable iframe while spoiler closed don't have hear sound time while not being in chatbox. know possibility?

thanks lot!

hiding in dom via style.display = 'none' hide it, if sound launch played.

i advise remove dom , add if needed: removing child node in javascript

to add have create iframe , add dom

var list=document.getelementbyid("mylist"); list.removechild(list.childnodes[0]); 

to create element need createelement , add dom appendchild

var node=document.getelementbyid("mylist2").lastchild; document.getelementbyid("mylist1").appendchild(node); 

reference


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -