<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head>
<script type="text/javascript">
function register() {
$.post(
"register.php",
{
"id": $('#id').val(),
"mail": $('#mail').val()
},
function(data){
alert(data);
},
"text"
);
}
</script>
<body>
<form name="test">
id:<br />
<input type="text" name="id" id="id" value="1" /><br />
mail:<br />
<input type="text" name="mail" id="mail" value="hoge@gmail.com" /><br />
<a href="javascript:register();">register</a>
</form>
</body>
</html>