//执行修改代表词动作
function doModifyKeywordsDaily(date,topicId){
var keywords = $('#keywordsDaily').val();
if(""==trimLeftAndRight(keywords)||null==keywords){
keywords="null";
}
var param = "timestart="+date+"&oid="+topicId+"&keywords="+keywords;
$.ajax({
url: 'allTopic!modifyKeywordsDaily.do',
type:'post',
data:param,
success:function(result){
//var e = jQuery.parseJSON(result);
var e = jQuery.parseJSON(result);
if(e.msg=='success'){
msgAlert("提示","修改成功");
$("#modifyKeywordsDialog").dialog('close');
reloadGrid();
var s = $('#classId1');
s.empty();//清除select中的 option
$.each(data.classlst,function(index,item){
if(index>=0){
var opt = $("<option>").text(item.className).val(item.classId);
s.append(opt);
}
});
}else{
msgAlert("提示","网络不稳定,修改失败,请稍后重试");
}
}
});
}
public void modifyKeywordsDaily(){
JSONObject json = new JSONObject();
JSONArray classlst = allTopicService.loadDocOrTopicClassesByClassId(2,this.classId);
json.put("classlst", classlst);
json.put("msg", "success");
this.setJSON(json.toString());
}
//js ajax :"是单引号
function getElection(){
$.ajax({
url:'BulletinAction-election.do',
type:'post',
success:function(result){
var data = jQuery.parseJSON(result);
//alert(data.msg);
if(data.msg == "success") {
var s = $("#bulletin");
$.each(data.jsonArr,function(index,item){
if(index>=0){
var li = '<li><a href="#" onClick="MM_showHideLayers("apDiv2","","show")" >';
li += '<img src="images/flag/flag_usa.png" alt="" width="50">';
li += '<span>' + item.name + '</span> </a></li>';
s.append(li);
}
});
}
}
});
}
jquery js 备忘
最新推荐文章于 2025-03-31 19:22:41 发布