Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="text" id="the_value" />
- <a href="#" onclick="return updateURL()" id="the_link">Click me</a>
- <script type="text/javascript">
- function updateURL()
- {
- document.getElementById('the_link').href =
- 'site.com/index2.php?info=' +
- encodeURIComponent(document.getElementById('the_value'));
- return true;
- }
- </script>
Add Comment
Please, Sign In to add comment