2012-01-02 69 views

回答

2

您可以選擇合適的對像屬性的值這個

$("input[value!='0']"); 

或者,如果你需要更有力地查詢,您可以使用過濾功能

$("input").filter(function() { 
    return +$(this).val() > 0; 
}); 

至於發送電子郵件,您需要回發到您的服務器並手動編寫一封電子郵件。 jQuery中沒有任何東西會爲你做。

如果您使用.NET,它可能是這個樣子:

System.Net.Mail.MailMessage Message = new System.Net.Mail.MailMessage(); 
Message.Body = String.Format("These are the inputs that were zero {0}", 
        String.Join(",", PostedInputIdsOf0)); 
Message.To.Add("[email protected]"); 
new System.Net.Mail.SmtpClient("host address").Send(Message); 
相關問題