『壹』 js裡面我使用encodeURI加密json字元串傳遞到另一個頁面,為什麼另一個頁面地址顯示參數只加密了一點
encodeURIComponent(escape("史蒂夫史蒂夫"))
『貳』 ajax jsonData 怎麼傳兩個json 格式的數據嗎
因為傳的兩個中有一個有公共的數據:如下我的代碼示例:
if(orderProType == 'MFS'){
var data = {
'question1':this.res.mobileQuestion1.getValue(),
'answer1':this.res.mobileAnswers1.getValue()
}
}else{
'question1':this.res.commQuestion1.getValue(),
'answer1':this.res.commAnswers1.getValue()
}
var publicData = {
'beVisitReapirOrderNums':beVisitReapirOrderNums,
'saveOrSubmit':saveOrSubmit,
。。。。
}
這個publicData 原本在data中是公有的,我不想寫兩段重復代碼,就想拿出這公共的data
Ext.Ajax.request( {
url : 'visit/info/doBatchVisitInfo.do',
method : 'POST',
scope : this,
jsonData: //需要傳入上面的json數據
success : function(){.......}