[这是在URL上未定义imagetxt变量的代码。此图像url将显示带有可变输出文本的图像,但不显示text。请任何人告诉我如何显示带有文字的图像?
var title = headers[i].toLowerCase();
console.log("\n Teams playing are "+title);
var imagetext=headers[i].replace(' ','+')
var indext=imagetext.indexOf(',')
var imagetxt=imagetext.substr(0,indext) // console.log("imagetxt");
//output: Ind vs Ban cricket match
temp = {
"title" : headers[i],
"image_url" : "http://placehold.it/1024x512/0084ff/f7f7f7?text="+imagetxt,
"subtitle" :result[i],
"text":short[i],
"buttons":[
我认为图像会显示正确的文本,但什么也没显示。请有人帮助我完成项目enter code here
好,谢谢堆栈溢出,我正在解决我的问题