mvc中从url中传递一个大字符串到Action时处理方法
作者:喻家军 发表时间:2014-12-09 23:44:16
页面中,当需要从url中传递一个大数据量到Action时处理方法
var url = "/Member/TempScore/DownLoadErrorList";
        var tempForm = document.createElement("form");
        tempForm.id="tempForm1";
        tempForm.method="post";
        tempForm.action=url;
        tempForm.target="tempForm1";
                 
        var hideInput = document.createElement("input");
        hideInput.type="hidden";
        hideInput.name= "errorData"
        hideInput.value= data;
        tempForm.appendChild(hideInput);
        document.body.appendChild(tempForm);
        tempForm.submit();

动态构建一个form标签 写入一个hidden 把值写入hidden 然后提交这个form