$(document).ready(function () {
$("#Result").click(function () {
$.ajax({
type: "POST",
url: "AjaxJquery.aspx/GetDate",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
alert(msg.d);
}
});
});
});
<span id="SpanID"></span>
<input type="button" value="Click" id="Result" />
我想在 span 中显示数据,现在它显示一条警报消息