Created
July 8, 2016 23:14
-
-
Save antonioortegajr/a5a5d591a212d3a54410338a458c7e92 to your computer and use it in GitHub Desktop.
Add the url to a form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<form action=""> | |
First name: <input type="text" name="fname"><br> | |
<input type="hidden" name="location"> | |
<input type="submit" value="Submit"> | |
</form> | |
<script> | |
var local = window.location.href; | |
document.getElementsByName('location').value = local; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment