在AJAX請(qǐng)求URL之前 把參數(shù)進(jìn)行encodeURI()轉(zhuǎn)碼。
如:
復(fù)制代碼 代碼如下:
var fileName=document.getElementById("filePath").value;
if(null!=fileName){
//alert(fileName);
//進(jìn)行轉(zhuǎn)碼 不然后臺(tái)會(huì)亂碼
fileName=encodeURI(fileName);
.........AJAX代碼
}
新聞熱點(diǎn)
疑難解答
圖片精選