已存在提示
$("#keyword").blur(function(){
var keyword = $("#keyword").val();
if(keyword==''){
$("#keyFlag").text("必须填写");
}else{
$.post("{weimicms::U('Keyword/testKeyword',array('keyword'=>'"+keyword+"','type'=>'add'))}",null,function(res){
if(res.result == 0){
$("#keyFlag").text(res.data);
}else{
$("#keyFlag").text('');
}
},"json");
}
});
<span id="keyFlag" class="red">必须填写</span>
$(window).load(function(){
var imgids = $("#imgids").val();
alert(imgids+"===");
imgCount=imgids.split(',').length - 1;
alert(imgCount);
if(imgCount == 1){
alert(imgCount);
$('#titledom').html($('#titledom_content').val());
$('#multione').html($('#multione_content').val());
$('#titledom').style.display="";
singlenews.style.display="";
multinews.style.display="none";
}
if(imgCount > 1){
singlenews.style.display="none";
multinews.style.display="";
$('#multione').html($('#multione_content').val());
$('#js_appmsg_preview').html($("#js_appmsg_preview_content").val());
}
});