vbscript变量的特点
 for each item in itemList
dim showType
if item.type <> "RMB" then showType = item.Type
next
当循环到了 item.type = "RMB" 的时候,showType竟然还是上一次循环的值。。。 dim showType竟然不能初始化变量了。。
这样就对了
for each item in itemList
dim showType : showType = ""
if item.type <> "RMB" then showType = item.Type
next
嗯。。我想vbscript的变量作用域是不能用语句块划分的。。
dim showType
if item.type <> "RMB" then showType = item.Type
next
当循环到了 item.type = "RMB" 的时候,showType竟然还是上一次循环的值。。。 dim showType竟然不能初始化变量了。。
这样就对了
for each item in itemList
dim showType : showType = ""
if item.type <> "RMB" then showType = item.Type
next
嗯。。我想vbscript的变量作用域是不能用语句块划分的。。
 
                     
                    
                 
                    
                 
 
         
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号