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

前端 未结 3 521
长情又很酷
长情又很酷 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:38

    This should be the condition you want

    If ((filter_purchase = 0) Or (filter_purchase = "")) Then
    

    @agamike, I believe a single = is used for comparison in a vbs if not and not == link here

提交回复
热议问题