Sending some data through URL for external html page by using the following method.

Ex: this code has in page1.html page

page2.html page should have the below function

function getQueryVariable(variable)
var query =;
var vars = query.split(“&”);
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split(“=”);
if(pair[0] == variable){return pair[1];}

Retrieving query string parameters in page2.html

var getvl1= getQueryVariable(“v1″);
getv1=getvl1.replace(/%20/g,” “);
var getvl2= getQueryVariable(“v2″);
getv2=getvl2.replace(/%20/g,” “);

1635 Total Views 2 Views Today

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>