!IsPostBack event from Javascript

I am using ASP.NETI have to set the value of a variable [testVar] into javascript on page load. only for the first time when the page load. Just like !IsPostBack event on code side.From next postback this function of javascript should not call. Please let me know how to implement it.
 
Top