0
即使沒有用戶在電子郵件字段中輸入「@」,我的表單也會發送。如何驗證表單中的電子郵件
如果沒有「@」,我該如何離開紅色邊框?
<input type="text" name="Name" placeholder="Nome..." class="quote-form-element" />
<input type="text" name="City" placeholder="Cidade/UF..." class="quote-form-element quote-form-client-email last" />
<input type="text" name="phone" placeholder="Telefone..." class="quote-form-element" />
<input type="text" name="email" placeholder="E-mail..." class="quote-form-element quote-form-client-email last" />
寫入代碼? 'if(無效字段){標記字段紅色; '',基本上。 –
這已經在這裏回答http://stackoverflow.com/questions/19605773/html5-email-validation – gautsch
可能重複的[在JavaScript驗證電子郵件地址?](http://stackoverflow.com/questions/46155/validate-電子郵件地址中的JavaScript) –