简单:
function btn_Connect_onclick() {
$.ajax({
type: "POST",
url: "/MySimpleService.svc/ParameterizedConnectionTest",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: {"word":" + $( #inputTextBox ).val() + "} ,
success: function(data) {
$( #result ).val(data.d);
}
});
}
标记:
<input type="text" id="inputTextBox"/>
<input type="text" id="result"/>