数据无法显示

totodele 2012-04-07 05:31:21

function Selck() {
var ps = new Array();
var chkother = $("input:checkbox");
for (var i = 0; i < chkother.length; i++) {
if (chkother[i].checked == true) {
var id = chkother[i].value;
var js = { "Uid": id };
ps.push(js);
}
}

$.post("/Tongji/LBywheres, "js=" + JSON.stringify(ps), function () {

})
}

</tr>
<%DAO.PageHelp ph = ViewData["ph"] as DAO.PageHelp;
if(ph!= null){
foreach (Dictionary<string, object> dics in ph.PageData)
{
double num = Convert.ToInt32(dics["InTimeCount"].ToString())/Convert.ToInt32(dics["EventAll"].ToString());
%>
<tr>
<td><%=dics["UIC"]%></td>
<td><%=dics["UName"]%></td>
<td><%=dics["EventAll"]%></td>
<td><%=dics["InTimeCount"]%></td>
<td><%=dics["OutTimeCount"]%></td>
<td><%=num.ToString("p")%></td>
</tr>
<%} %>
<%} %>




Selck方法是我进行查询的。页面中选择多个checkbox后进行查询后的结果保存在ViewData["ph"]里面,我跟踪断点可以看到值是存在的,但是为什么页面中显示出来的总是空白,但是我导出数据却是有的。










...全文
83 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
totodele 2012-04-08
  • 打赏
  • 举报
回复
o(︶︿︶)o 唉
totodele 2012-04-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

$.post("/Tongji/LBywheres, "js=" + JSON.stringify(ps), function () {

})
,"js=" + JSON.stringify(ps),
这里不应该这样写吗?
, {"js":JSON.stringify(ps) },
还有,你post之前,直接alert(JSON.stringify(ps)……
[/Quote]
那样写是正确的
wzhiyuan 2012-04-07
  • 打赏
  • 举报
回复
$.post("/Tongji/LBywheres, "js=" + JSON.stringify(ps), function () {

})
,"js=" + JSON.stringify(ps),
这里不应该这样写吗?
, {"js":JSON.stringify(ps) },
还有,你post之前,直接alert(JSON.stringify(ps)),结果正确?

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧