我基本上将人员插入我的数据库并使用下面的代码。插入db后(if = response == ok)
它将人员添加到db。但是,我必须向增加的人展示。如果我使用重新加载它发送主页。你的建议是什么?
function AddData(par){
var artistName = $("input[name='"+par+"']").attr('id') + '-'+$("input[name='"+par+"']").val();
$.post('/json/management/AddDataAjax2',
{
"artistName": artistName
},
function(response){
console.log(response);
if(response =='ok')
alert("Başarıyla eklendi");
else{
alert("Sanatçı bulunamadı, yönlendiriliyorsunuz");
window.location.replace("http://www.sinemalar.com/management/artistAddEditRemove/");
}
});
}