Created
January 20, 2010 10:54
-
-
Save gshutler/281764 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
$("button").click(function() { | |
$("form").append( | |
$("<input />") | |
.attr("type", "hidden") | |
.attr("name", "search") | |
.val("4")); | |
$("form").submit(); | |
}); | |
}); | |
</script> | |
<form action="test.html" method="GET"> | |
<input type="hidden" name="search" value="1" /> | |
<input type="hidden" name="search" value="'it's something else'" /> | |
<input type="hidden" name="search" value="3" /> | |
</form> | |
<button>Something else to trigger an event</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment