虚拟表单提交,页面不动导出excel

虚拟表单提交,页面不动导出excel ,

common.js 中注加方法:
//调用方法    
//post('login.do', {username : xxxx, password : yyyy});
function ajaxPutOut(url, params) {      
    var tempForm = document.createElement("form");      
    tempForm.action = url;      
    tempForm.method = "post";      
    tempForm.style.display = "none";      
    for (var x in params) {      
        var opt = document.createElement("textarea");      
        opt.name = x;      
        opt.value = params[x];      
        // alert(opt.name)      
        tempForm.appendChild(opt);      
    }      
    document.body.appendChild(tempForm);      
    tempForm.submit();      
    //return tempForm;     
    return false; 

页面表单样式:

<a class="tbexcel" href="javascript:ajaxPutOut('__URL__/exportExcelList','');"   title="您确定要评估报表吗?">
<span>批量导出Excel</span>
</a>
 <button class="xyOutput" type="button" onclick="ajaxPutOut('__URL__/exportExcelList','');">导出111</button>

发表评论