日期:2014-05-18 浏览次数:20673 次
前台
$(function () {
$.post("WSXFY.ashx", {"action":"getpagecount" }, function (data, status) {
for (var i = 1; i <= data; i++) {
var td = $("<td><a href=''>" + i + "</a></td>");
$("#trPage").append(td);
}
});
});
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
string action=context.Request["action"];//无法获取action的值
function F(str){
$.ajax({
url: "A.ashx",
type: "POST",
dataType: "text",
data: "s=" + str + "",
beforeSend:function(){
$("#tip").val("处理中...");
},
success: function(result){
$("#tip").html(result);
},
error: function(resMsg){
}
});
}
------解决方案--------------------
Request.Querystring是取get方式的参数的
Request.Form则是获取提交表单的 post方式
所以要对应好了 如果嫌麻烦 就直接Request.Params就可以了 前面2者的参数都可以接受到
------解决方案--------------------
<script src="js/jquery-1.4.2-vsdoc.js" type="text/javascript"></script>
把这个去掉 这个好像不需要显示引用的 直接放在jquery.js同目录下就可以了
有可能是这个造成了jquery不能使用 先试下吧
------解决方案--------------------