Wednesday 15 September 2010

Clear HTML page using JavaScript -


Is there a way to remove the contents of the existing content on a JavaScript function page? Like:

  & lt; I am curtained & gt; & Lt; Is there any JavaScript or HTML statement here? & Gt; & Lt; I display it and gt;  

What should I put in & lt ;? I can put any javascript or HTML statement here & gt; ?

I know to put & lt; Div style = "display: none" & gt; & Lt; Plain & gt; Share I want to see Will Hide appearing at the end of a page, but how to do it I document.body.innerHTML = "" "post-text" itemprop = " Text ">

Can you use it? Code>. As long as the browser processes the page, it will remove everything in the body. See the following example:

  & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; It should not appear & lt; / P & gt; & Lt; Script type = "text / javascript" & gt; Document.body.innerHTML = ''; & Lt; / Script & gt; & Lt; P & gt; It should look. & Lt; / P & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

This, however, is not a great way to accomplish this. If you want to hide some text, think about jQuery as told about others.


1 comment: