I have two HTML pages: source.html and dest.html
There are 2 ways to send the message.
In source create a form which submits to dest.html, make sure the method is 'GET'
On click of the button set the value of the message and submit the form
// something like document.getElementById('message').value = 'HELLO'; document.getElementById('form').submit();
2a. You dont need to make the form, you can just redirect with hardcoded url on the source.html button click like
window.location = 'dest.html?message=somemessage';
On submit the dest.html file will open, with the message available in the URL of the page
var url = window.location+"";
// if there are multiple parameters you will have to loop and store them in array for single you can use
var message = url.substr((url.indexOf('=')+1)); alert(message);
2nd Method Not tried, store them in cookies when button gets clicked on source.html and read the cookies in dest.html