java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
12 回复
老大,别这么直接撒
来自炫酷的 NutzCN
是这样,我在做一个textarea内容保存为文本文件,内容很正常,但往后台送时就报这个错
来自炫酷的 NutzCN
function download_file(url)
{
if(typeof(download_file.iframe)=== "undefined")
{
//var iframe=document.getElementById('imsswitchForm');
var iframe = document.createElement("iframe");
download_file.iframe = iframe;
document.body.appendChild(download_file.iframe);
}
download_file.iframe.src = url;
download_file.iframe.style.display = "none";
$.ajax({
url: url,
type: "post",
dataType: "json",
success:function(data)
{
if(data!=undefined)
alert(data);
},
error:function()
{
alert("文件导出不成功,请请通知管理员处理");
}
});
}
function save()
{
if(document.getElementById("txtdest_id").value.trim()!="")
{
download_file("../imsswitch/download?dest="+$('#txtdest_id').val());
}
else
{
alert("数据为空,无需保存");
}
}
<button id="save_id" size="4" onClick="save()" >保存文本</button>
添加回复
请先登陆