Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document write

Status
Not open for further replies.

What do you mean by "clear the document.write"?

Do you mean remove text or HTML nodes from the DOM?

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
It's still difficult to understand what you're asking for. If you use document.write() with a page that already has been written in a browser, the original contents will be deleted and whatever is in the document.write statements will replace it. That's not generally done deliberately, though I've done it a couple times by accident.

Lee
 
This will clear the entire page.

<input type="button" name="btn" value="Clear" onclick="document.write('')"/>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top