$("#total_price").val($("#active_money").text());
<button class=" btn btn-block btn_color" type="submit">预约</button>
<script>
$(function () {
$("#total_price").val($("#active_money").text());
var __formSubmit = false;
$("form").on('submit',function () {
//console.log($(this).serialize());
if (__formSubmit) {
return false;
}
__formSubmit = true;
$.ajax({
url: this.action,
type: 'post',
data:$(this).serialize(),
dataType:"text",
complete: function(XMLHttpRequest, textStatus) {
console.log('complete_XML: '+XMLHttpRequest);
console.log('complete_textStatus: '+textStatus);
},
error: function(xml,errStatus,errThrown){
console.log('error_xml: '+xml);
console.log('error_errStatus: '+errStatus);
console.log('error_errThrown: '+errThrown);
},
success:function (res) {
console.log(typeof(res));
console.log(res);
}
});
return false;
})
})
</script>