I am new to javascript please help me how to pass the variables from one page to another page.

I have a login page with main.html in this page i have username and password. another page named as login.js file in this javascript file i have username array and password array.
go to singal url its ok but multi url( different target ) i don't know about that how if you now Plz...