send href variable to new page img src - advice appreciated!

send href variable to new page img src - advice appreciated!

Sorry to bother with such a basic request but have been searching for an answer to this for 2days now & cannot find a precise answer..

I have a base html page which contains several thumbnail images with links to enlarged images which I'd like to view in an external page [so I can control the dimensions of the enlarged image]. I thought it best to use an external template html page to launch these within and therefore imagine I need to declare the variable in the thumb links page & image they may need to look something like this:

<a href="mytemplate.html?imgVar=/images/collection/large1.jpg">thumb1.jpg</a>
<a href="mytemplate.html?imgVar=/images/collection/large2.jpg">thumb2.jpg</a>
<a href="mytemplate.html?imgVar=/images/collection/large3.jpg">thumb3.jpg</a>

Then in the external page pick up the variable something like:

<img src="imgVar">

I've looked all over Google & can only see something similar to this in php. Is there a way to achieve this with jQuery instead?

Any assistance would be much appreciated.