jQuery-简单的输入验证-“空”和“非空”

我有一个要验证的输入:

<input type="text" id="input" />

这是JS:

        jQuery("#input").live('change', function() {

            if("#input:not(:empty)") {
                alert('not empty');
            }   

            else if("#input:empty") {
                alert('empty'); 
            }
        });

即使“ #input”为空,也无法通过“空”消息显示警报。因此,基本上,无论我做什么,始终总是只有第一个陈述是正确的,第二个陈述是错误的。

怎么了?