Here is my HTML code:
<input id="text" type="text" name="text">
<input type="button" name="page1" onclick="javascript:window.open('http://example.com/' + this.name + '/' + document.getElementById('text').value)">
If you put any text in the field it and click on the button it will redirect to http://example.com/page1/anytext
I'm trying to make this button to be able to redirect to the URL and also copy it to clipboard. So if any visitor put anytext
on the field it will copy the url http://example.com/page1/anytext
and also redirect to the URL.