日期:2014-05-17  浏览次数:20835 次

奇怪的问题
Function   show_price(price)
if   price   <>   " "   then
price=price& "   万元 "
else
price= "价格面议 "
end   if
show_price=price
end   Function
这样的话正常

Function   show_price(price)
if   price   =   " "   then
price= "价格面议 "
else
price=price& "   万元 "
end   if
show_price=price
end   Function
这样的话无论price是不是空都是跳到price=price& "   万元 "
什么原因

------解决方案--------------------
" " 空字符串
null 空
undefined 未初始化

你的第一个函数里else包含了这些情况