Adding a variable to a getURL line (correct way to code it)

Hey all, all I want to do is add a variable to a getURL line of code.

EG:
getURL("/index.asp", “_self”);

I need to add a variable (_root.myvariable) to the end of the link so that it goes to:
index.asp?myvar=thevalueofmyvariable

Just not sure on the correct way to code it.

Any hlep would be great.