标记的情况下提交用户信息?
谢谢
--------------------------------------------------
-------------------------------------------------- ------
感谢大家的回复。
更新: 我遵循“
the_void”的代码,并将AJAX的URL更改为ServerSocket(由Java实现)。服务器能够获取POST事件,但无法读取AJAX的“数据”。以下是html代码:
的HTML
$(document).ready(function() {
$('#submit').click(function() {
//information to be sent to the server
info = $('#foo').val();
$.ajax({
type: "POST",
url: 'http://10.0.0.3:8888',
data: ({foo: info}),
//crossDomain: true,
//dataType: 'json'
});
return false;
});
});
Text
Submit via Ajax