$("#SeatCount, #Charge").on("keyup", function () {
if (this.value.replace(/^0|\D/g, '') === "") {
this.style.border = "1px solid red";
} else {
this.style.border = "";
}
});
keyup 与change事件会有兼容性问题,在手机上。
http://www.cnblogs.com/deng02/archive/2009/12/08/1619576.html
http://skyfar666.iteye.com/blog/894837
正则表达式
http://www.cnblogs.com/Mainz/archive/2009/03/14/1411359.html