这是我用来在标题中显示图像的代码。我遇到的问题是我想为图像使用一个变量,当我输入变量名称而不是图像名称时,我得到一个错误:
Microsoft JScript 运行时错误“800a138f”
'undefined' 为 null 或不是对象
/EKtestdb/fpdf/fpdf/includes/Basics.asp,第 121 行
this.Header=function Header()
{
this.SetY (10)
this.SetFont ("Times","",10)
//this.Cell (45,5, "HEADER", 0, 0, "L")
this.SetFont ("Times","b",14)
//this.Cell (190,5, this.title, 0, 0, "C")
this.Cell (190,20, this.title, 0, 0)
this.SetFont ("Times","",10)
this.Image('logoSM1.jpg',165,3,33)
this.Image( techpic ,165,3,33)
这是 basics.asp 第 121 行的代码:
this.strrpos=function strrpos(s,ch){
res = s.lastIndexOf(ch)
if (res>0-1){return res}else{return false}
}
this.strpos=function strpos(s,ch,start){
if (arguments.length<3){start=0}
res = s.indexOf(ch,start);
if (res>-1){return res}else{return false}
}
如果您只想显示图像,则此行应该有效:
this.Image('logoSM1.jpg',165,3,33)
但是对于使用变量而不是图像名称,有人可以帮忙吗?