1.jquery-1.7.2.js版本ajax用法
<script type="text/javascript">
jQuery(function () {
jQuery('#btn').click(function (){
var t = jQuery('#frm').serialize();
console.log(t);
jQuery.post("updatedaily.do",t,function (data){
var t = eval('(' + data + ')');
console.log(t.msg);
alert(t.msg);
window.location.href="findAllDaily.do";
})
})
})
</script>
2.jquery-1.8.3.js版本ajax用法
<script type="text/javascript">
$(function () {
$('#btn').click(function (){
var t = $('#frm').serialize();
console.log(t);
$.post("updatedaily.do",t,function (data){
var t = eval('(' + data + ')');
console.log(t.msg);
alert(t.msg);
window.location.href="findAllDaily.do";
})
})
})
</script>