js判断输入是否为空

来源:互联网 发布:淘宝定制商品规则买家 编辑:程序博客网 时间:2024/05/17 06:37

js判断只要不是空字符串都为true

eg:  1.   if ($("#emp_no").textbox('getValue')) {}

        2.   if ($("#emp_no").textbox('getValue')!=null&&$("#emp_no").textbox('getValue')!="") {}

              (getValue获取的是字符串,即使不输入,获取的也是空字符串)

0 0