日期:2014-05-17 浏览次数:20635 次
//导出Excel功能 function inserToExcelBtnClick() { var sendID = ""; var url = "ToExcel.action"; for (var i = 0; i < count; i++) { sendID = sendID + ";" + treeNodeID[i]; } sendID = sendID.slice(1); alert(sendID); $.post(url, { "type": mappingType, "list": sendID }, function() { }, "json"); };
MemoryStream ms = NPOIHelper.ToExcel(RequirementDetailForXls) as MemoryStream; context.Response.AddHeader("Content-Disposition", ("attachment;filename=" + filename)); context.Response.Charset = "UTF-8"; context.Response.ContentType = "application/json"; context.Response.BinaryWrite(ms.ToArray()); ms.Close(); ms.Dispose();
$.post(url, { "type": mappingType, "list": sendID }, function() { }, "json");
------解决方案--------------------
src长度限制2046字节,个人测试2020长度极限(IE)
HTML5貌似增加了新的通信对象,支持服务器 推,目前没有研究,你可以看看