<form role="form" class="register-form cf-style-1" name="index" action="#" method="post">
<div class="field-row">
<label>First Name: *</label>
<input type="text" name="firstName" class="le-input">
<label>Last Name: *</label>
<input type="text" name="lastName" class="le-input">
<label>Email: *</label>
<input type="text" name="email" class="le-input">
<input type="hidden" name="dbAction">
<label>Mobile Number: *</label>
<input type="text" name="mobileNumber" class="le-input">
<label>Create Password: *</label>
<input type="password" name="createPassword" class="le-input">
<label>Confirm Password: *</label>
<input type="password" name="confirmPassword" class="le-input">
</div><!-- /.field-row -->
<div class="buttons-holder">
<button type="button" name="submit" onclick="validatePageData();" class="le-button huge">Sign Up</button>
</div><!-- /.buttons-holder -->
</form>
<script>
function validatePageData() {document.index.submit();
}`
答案 0 :(得分:0)
document.forms[name ="index"].submit()
应该有用。