Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    May 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Using Javascript To Strip codes

    Is there any way to use javascript to strip codes or text from a webpage.

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Posts
    726
    Thanks
    35
    Thanked 132 Times in 123 Posts
    window.onload=function(){document.body.innerHTML=''};

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,032
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    LOL!!!

    That's a bit extreme, Mr.Hoo, but it would certainly do what he asked.

    JustFreebies: That will essentially *erase* your entire page's contents.

    Maybe you need to be a *tiny* bit more explicit about what you *really* want?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    Regular Coder
    Join Date
    Mar 2006
    Posts
    726
    Thanks
    35
    Thanked 132 Times in 123 Posts
    Unfortunately the method I used requires javascript-

    the improvement cannot be enjoyed by users without javascript,
    or with javascript turned off.

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,032
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    Quote Originally Posted by mrhoo View Post
    unfortunately the method i used requires javascript-

    the improvement cannot be enjoyed by users without javascript,
    or with javascript turned off.
    rotflmao!!!
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #6
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,899
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Quote Originally Posted by justfreebies View Post
    Is there any way to use javascript to strip codes or text from a webpage.
    What exactly are you trying to do? And why? Do you mean from someone else's web page?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •