Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

how can i clear the variable value?

bengesbenges Posts: 331Member
can i know how can i clear the variable value that has been assigned?
which mean everytime i refresh a page, the existing variable value will gone...
thank a lot

Comments

  • lillulillu Posts: 308Member
    Hi,

    1. with reload()

    document.self.location.reload(); - reloads the original page and resets values (it might be useful if the script changed)

    2. with reset()

    javascript:reset(); - clears the values (eg. in a form) but does not reload the page

    3. with refresh()

    it triggers an onload but does not clear the values

    so the 3rd option is not what you're looking for I just put it here to to make clear what happens when you click the refresh button in the browser. I mean when you refresh the page, the values will not be gone.

    HTH,

    Lillu

    : can i know how can i clear the variable value that has been assigned?
    : which mean everytime i refresh a page, the existing variable value will gone...
    : thank a lot
    :

Sign In or Register to comment.