//例子三
var countChecked = function() {
var n = $( "input:checked" ).length;
$( "#t" ).text( n + (n == 1 | n == 0 ? " is" : " are") + " checked!" );
};
例子的意思是1 或者 0 都 是输出 is 其他情况 输出 are
var countChecked = function() { var n = $( "input:checked" ).length; $( "#t" ).text( n + (n == 1 | n == 0 ? " is" : " are") + " checked!" ); };