"+list[i].title+"
" + ""+list[i].summary+"
" + " "+list[i].createDate+"" + "function commit(){
$.ajax({
type: 'GET',
// dataType: 'json',
async: true,
url: "editArticleSubmit1",
data: {
name:$("#name").val(),
sex:$("#sex").val(),
age:$("#age").val(),
purpose:$("#purpose").val(),
workAge:$("#workAge").val(),
content:$("#content").val(),
},
success: function (data) {
// obj=eval('('+obj+')');//这段代码就是将字符串转换成json格式
/\*var name = this.data.name;
var sex = this.data.sex;
var age = this.data.age;
var purpose = this.data.purpose;
var workAge = this.data.workAge;
var content = this.data.content;\*/
alert("投递成功");
}, error: function (msg,status) {
alert(msg+status);
return;
}
});
// var a=$("#massage").val();
// alert(a)
}
ajax发送获取数据处理后显示在前端页面
function articleList(page) {
$.ajax({
url: "indeArticleList",
data: {
pageNum: page,
pageSize: 9
},
type: 'GET',
dataType: 'json',
async: true,
success: function (data) {
var list = data.list;
$("#prePage").val(data.prePage);
$("#nextPage").val(data.nextPage);
$("#tailPage").val(data.pages);
$("#pageNum").text(data.pageNum);
console.log(list);
if(list != null && list.length > 0){
$("#container").empty();
var articleDiv = "";
for(var i=0; i
"
if(i>0 && i%3==0){
articleDiv += "
手机扫一扫
移动阅读更方便
你可能感兴趣的文章