how can i clear the variable value? - Programmers Heaven

Howdy, Stranger!

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

Categories

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.