Call js in function NextPage ()

Hi All ,

How can i call js function in function NextPage ()?

I don't want to call js function after  call function NextPage(). I want to put js function in the end of function NextPage().

thanks in advance.