define(function(require, exports, module) {
require('../../comp/init.js');
require('../../Y-all/Y-script/Y-select.js');
require('../../Y-all/Y-script/Y-imgplayer.js');
$(".detail").click(function() {
var id = $(this).attr("articleId");
$.ajax({
type : 'post',
url : '/publish/noticeDetail.json',
data : {
"id" : id
},
dataType : "json",
success : function(res) {
console.log(typeof res);
if (res.status == "EXECUTE_SUCCESS") {
$("#title").html(res.article.articleTitle);
$("#content").html(res.article.articleContent);
$('#nowId').val(id);
windx = $('body').Y("Window", {
key : 'pending',
content : $('#pending'),
title : '查看详情',
width : 760
});
} else {
}
},
error: function(e){
alert(343443)
}
});
});
$(function() {
var result = "$!result";
if (result == "true") {
alert("保存成功");
} else if (result == "false") {
alert("保存失败");
}
});
});
jq中json请求的写法!
最新推荐文章于 2023-10-20 23:35:27 发布