你能告诉我如何在 jQuery 的参数中发送路径数组(所有数组值)吗?
我正在使用这个插件:https ://github.com/phonegap/phonegap-plugins/blob/master/iOS/EmailComposerWithAttachments/readme.md
有一个
window.plugins.emailComposer.showEmailComposerWithCallback(
function(result) {
console.log(result);
},
"Look at this photo",
"Take a look at <b>this<b/>:",
["example@email.com", "johndoe@email.org"],
[],
[],
true,
["_complete_path/image.jpg"]
);
路径参数。
$(document).on('click', '.email_h', function() {
setTimeout(function(){
var txtfilepath= window.localStorage.getItem("TEXTFILE_PATH");
var PATH =new Array();
for(var i=0;i<10 ;i++){
PATH[i]=txtfilepath+'/'+CASENAME+'/'+DOCUMENT_NAME+'.rtf';
}
alert(PATH[0]);
alert(PATH[1]);
var Email_PATH=txtfilepath+'/'+CASENAME+'/'+DOCUMENT_NAME+'_email.html';
connectionStatus = navigator.onLine ? 'online' : 'offline';
if(connectionStatus=="offline"){
PG_alert(" No Internet connection ! ");
} else {
window.plugins.emailComposer.showEmailComposerWithCallback(
function(result){
if(result==0){
PG_alert("Email composition cancelled.")
} else if(result==1) {
PG_alert("Email saved.")
} else if(result==2) {
PG_alert("Email sent")
} else if(result==3) {
PG_alert("Send fail.")
} else if(result==4) {
PG_alert("Email not sent.")
}
console.log(result+"Result");
},
"Case Documents ",
"I am forwarding the attached for your information... <b><b/>",
[""],
[],
[],
true,
[PATH[0],PATH[1]]
);
//window.plugins.emailComposer.showEmailComposerWithCallback(null,"Look at this photo","Take a look at <b>this<b/>:",["example@email.com", "johndoe@email.org"],[],[],true,["_complete_path/image.jpg", "_other_complete_path/file.zip"]);
}
},100);
我需要发送 PATH 数组(具有所有值)。当我像这样放置 PATH[0],PATH[1]] 时,它正在工作,它需要路径。如果我需要发送所有路径(10 路径是 PATH 变量)。怎么可能。
Not like that PATH[0],PATH[1]PATH[2],PATH[3]
});