Reputation: 9
In this line:
var dataString = 'name='+ name + '&email=' + email + '&subject=' + subject + '&msg=' + msg;
What does the ampersand(&
) mean?
Upvotes: 0
Views: 1182
Reputation: 26376
I think the ampersands are meant for query string separation from each other
var dataString = 'name='+ name + '&email=' + email + '&subject=' + subject + '&msg=' + msg;
becomes
var dataString = 'name=John Doe&[email protected]&subject=some email subject&msg=hey activate your account';
This can then be appended to your Url
var finalUrl = "http://mysite.com?" + dataString;
Upvotes: 2