Skip to content

Instantly share code, notes, and snippets.

@uedatakeshi
Created November 4, 2008 01:48
Show Gist options
  • Save uedatakeshi/22049 to your computer and use it in GitHub Desktop.
Save uedatakeshi/22049 to your computer and use it in GitHub Desktop.
// 画像のsubmitボタンをねつ造して別cgiに同時にsubmitしてデータを飛ばす
$(function(){
var username = $('table:first table:first tr:first td:first font:last')[0].innerHTML;
$('input[name=s_go]').click(function() {
$.get(
'another.cgi?username=' + username, '',
function(data){
$("<input type='hidden' name='submit_x' />").appendTo("form").val(20);
$("<input type='hidden' name='submit_y' />").appendTo("form").val(16);
                            $('form').submit();
}
);
return false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment