谁能帮我看看为什么我的jQuery ajax数据提交不过去
<script type="text/javascript">
function cheshi(id) {
$.ajax({
type: "POST",
url: "/tools/admin_ajax.ashx?action=cheshi",
data: { id:id },
dataType: "json",
beforeSend: function (XMLHttpRequest) {
//发送前动作
},
success: function (data, textStatus) {
$("#div1").text(data.word_ename);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
$("#div1").text("错误");
}
});
}
</script>
<div id="div1">123</div>
<img alt="哪位高手能帮小弟我看看为什么小弟我的jQuery ajax数据提交不过去" src="../../images/msg.png" onclick="cheshi(2)"/>
case "cheshi": //
cheshi(context);
break;
private void cheshi(HttpContext context)
{
int id = DTRequest.GetFormInt("id");
BLL.word bl=new BLL.word();
Model.Word wo=new Model.Word();
wo = bl.GetGoodsModel(id);
context.Response.Write("{"word_ename":" + wo.word_ename + ", "word_cname":" + wo.word_cname + "}");
return;
}
context.Response.Write("{"msg":1, "word_ename":"" + wo.word_ename + "", "word_cname":"" + wo.word_cname + "", "msgbox":"成功了!"}");