In vbscript can you use two possible conditions in an if statement? (OR)

前端 未结 3 490
长情又很酷
长情又很酷 2021-01-19 17:45

An example would be:

If filter_purchase = 0 Or \"\" Then
SetDocVar \"filter_purchase\", \"0\"
Else
SetDocVar \"filter_purchase\", CStr(filter_purchase)
End I         


        
3条回答
  •  滥情空心
    2021-01-19 18:31

    you have to explicitly state the condition for each OR. Please see below

    If filter_purchase = 0 Or filter_purchase = "" Then
       SetDocVar "filter_purchase", "0"
    Else
       SetDocVar "filter_purchase", CStr(filter_purchase)
    End If
    

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题