这是我的设计代码->
<script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script>
<script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("input[id$='Button1']").click(function () {
$.ajax({
type: "GET",
url: "Default.aspx",
data:'{ a: 2, b: 3 }',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data, textStatus, request) {
alert(data);
$("#weather-temp").html(data[0]);
}
});
});
});
</script>
<asp:TextBox ID="test" runat="server" Text="hi"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
结果:它在警报框中显示 Null ......谁能解决我的问题......