拆除清運工程價格便宜,樓層搬運快速清空
不論遠近免費估價,全年無休
廣告招牌工程拆除清運工程價格便宜,樓層搬運快速清空
不論遠近免費估價,全年無休

首頁  •  j2h 論壇 • 程式設計討論     • 

[JQuery] 表格post

房東:茶茶
發表時間:2011-05-16


<div id="contact_form"> 

<form name="contact" action=""> 

  <fieldset> 

    <label for="name" id="name_label">Name</label> 

    <input type="text" name="name" id="name" size="30" value="" class="text-input" /> 

    <label class="error" for="name" id="name_error">This field is required.</label> 

 

    <label for="email" id="email_label">Return Email</label> 

    <input type="text" name="email" id="email" size="30" value="" class="text-input" /> 

    <label class="error" for="email" id="email_error">This field is required.</label> 

 

    <label for="phone" id="phone_label">Return Phone</label> 

    <input type="text" name="phone" id="phone" size="30" value="" class="text-input" /> 

    <label class="error" for="phone" id="phone_error">This field is required.</label> 

 

    <br /> 

    <input type="submit" name="submit" class="button" id="submit_btn" value="Send" /> 

  </fieldset> 

</form> 

</div> 


 


 




var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone;  

//alert (dataString);return false;  

$.ajax({  

  type: "POST",  

  url: "bin/process.php",  

  data: dataString,  

  success: function() {  

    $('#contact_form').html("<div id='message'></div>");  

    $('#message').html("<h2>Contact Form Submitted!</h2>")  

    .append("<p>We will be in touch soon.</p>")  

    .hide()  

    .fadeIn(1500, function() {  

      $('#message').append("<img id='checkmark' src='images/check.png' />");  

    });  

  }  

});  

return false;  




http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/





  • 贊助網站       

    廣利不動產-板橋在地生根最實在--新板特區指名度最高、值得您信賴的好房仲
    完整房訊,房屋、店面熱門精選物件,廣利不動產 優質仲介,房屋租賃、買賣資訊透明,交易真安心!
    廣利不動產-新板特區指名度最高、值得您信賴的好房仲
    您的托付,廣利用心為您服務

  • 1 樓住戶:阿凱
    發表時間:2011-05-16

    http://www.catswhocode.com/blog/10-jquery-tutorials-for-working-with-html-forms



     共 1 人回應  選擇頁數 【第1 頁】 

    姓名:
    佈告內容:
    其他選項: