2
//在這裏我只想插入numbers.how可以嗎?jQuery驗證幫助
function validate_proprty_price()
{
if($("#proprty_price").val() == '')
{
proprty_price.addClass("error");
proprty_price_span.text("Please Enter Price");
proprty_price_span.addClass("message_error2");
return false;
}
else{
proprty_price.removeClass("error");
proprty_price_span.text("");
proprty_price_span.removeClass("message_error2");
return true;
}
}
/*不工作* /功能validate_proprty_price() \t { \t \t如果(isNaN(數字(價格)) \t \t { \t \t \t proprty_price.addClass( 「錯誤」); \t \t \t proprty_price_span.text(「請輸入價格」); \t \t \t proprty_price_span.addClass(「message_error2」); \t \t \t return false; \t \t} \t \t否則{ \t \t \t proprty_price.removeClass( 「錯誤」); \t \t \t proprty_price_span.text(「」); \t \t \t proprty_price_span.removeClass(「message_error2」); \t \t \t return true; \t \t} \t} – user741996 2011-05-09 09:39:06