var script;
upAndEndTitleHtml ()
function upAndEndTitleHtml () {
script = $('#'+infoUpEndId);
if (script.attr('queryData')) {
var url = script.attr('url');
var scriptId = script.attr('id');
var divId = 'infoUpEndId_' + scriptId;
var queryData = JSON.parse(script.attr('queryData').replace(/'/g, "\""));
getUpEndTitle(url, queryData, divId);
}
}
function getUpEndTitle(url, queryData, divId) {
$.ajax({
url: url,
type: 'get',
data: queryData,
success: function(result) {
var html="";
if(result.data.topTitle != "" && result.data.topTitle != null){
html += '上一篇:'+ result.data.topTitle +'
';
}else{
html += ''+ result.data.topTitle +'
';
}
if(result.data.endTitle !="" && result.data.endTitle !=null){
html += '下一篇:'+ result.data.endTitle +'';
}else{
html += ''+ result.data.endTitle +'';
}
$('#' + divId).html(html);
},
error: function(error) {
layer.msg('系统错误');
}
})
}