- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
<form method="POST" id="acceptaction" action="/">
<input type="submit" value="Принять участие" name="startUserEvent" />
<input type="hidden" value="62" name="userid" />
</form>
<div id="result"></div>
jQuery(document).ready(function()
{
jQuery("#acceptaction").submit(function(event)) {
event.preventDefault();
var form = jQuery( this ),
term = form.find( 'input[name="userid"]' ).val(),
url = form.attr( 'action' );
jQuery.post( url, { userid: term },
function( data ) {
var content = jQuery( data ).find( '#content' );
jQuery( "#result" ).empty().append( content );
};
);
};
});