编辑Ajax表单命令

How can I change the below code of the submit button, to a code that will also print and/or return to top of page?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="https://ajax.googleapis.com
/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="https://www.google.com/
recaptcha/api.js" async defer></script>
<link rel="stylesheet" type="text/css"
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-
awesome.min.css" />
<link rel="stylesheet" type="text/css" href="file:///C|/Users/CRAIG
/Desktop/test/form_files/ajax-form.css" />
<script type="text/javascript" src="file:///C|/Users/CRAIG/Desktop
/test/form_files/jquery.ajax-form.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#JQAjaxForm1').fdAjaxForm({formEmailURL:"file:///C|/Users/CRAIG
/Desktop/test/form_files/email.php",formFileUploadURL:"file:///C|/Users
/CRAIG/Desktop/test/form_files/file_upload.php"});
});
</script>
</head>

<body>
<form id="JQAjaxForm1" class="JQAjaxForm" action="?" method="post">
  <div class="cf_form_content">
    <div class="cf_form_element cf_basic_element cf_required">
      <div class="cf_field_cover"> <span> <span class="cf_main_label">
  <span>Name:</span></span> <span class="cf_sub_label"><span>your
 name</span></span> </span>
    <div>
      <input type="text" name="name[]" placeholder="Your name" />
    </div>
  </div>
</div>
<div class="cf_form_element cf_email_element cf_required">
  <div class="cf_field_cover"> <span> <span class="cf_main_label">
<span>Email:</span></span> <span class="cf_sub_label"><span>a valid
 email</span></span> </span>
    <div>
      <input type="text" name="email[]" placeholder="Your name" data-val-
type="email" />
      <i class="cf_icon_mail"></i> </div>
  </div>
</div>
<div class="cf_form_element cf_textarea_element cf_required">
  <div class="cf_field_cover"> <span> <span class="cf_main_label">
<span>Message:</span></span> <span class="cf_sub_label"><span>more
 details</span></span> </span>
    <div>
      <textarea name="message[]" rows="5" placeholder="Type your message
here..."></textarea>
    </div>
  </div>
</div>
<div class="cf_form_element cf_submit_element">
  <div class="cf_field_cover">
    <div>
      <div class="cf_submit" style="text-align:right">
        <div class="cf_submit_button" style="float:right"> <span
 class="cf_label">Submit</span> <span class="cf_icon_submit"></span>
</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</form>
</body>
</html>

This is the whole ui for the submission form. The latter section has the coding to submit the form. I am not sure what else to add/contribute to help.

查看全部
weixin_33709590
weixin_33709590
2016/04/19 14:41
  • html
  • ajax
  • jquery
  • xhtml
  • 点赞
  • 收藏
  • 回答
    私信

1个回复