function delData(com, grid) {
if ($('.trSelected', grid).length > 0) {
var ids ="";
$('.trSelected td:nth-child(1)',grid).each(function(){
ids+=","+$(this).text();
});
ids=ids.substring(1);
$("#delIdsHidden").val(ids);
window.parent.openModalDialog(450, 180, "删除菜单", $("#delDataDiv").html());
$(parent.document).find("#delIdsHidden").val(ids);
} else {
messageBox("提示","请选择数据!");
}
}
if ($('.trSelected', grid).length > 0) {
var ids ="";
$('.trSelected td:nth-child(1)',grid).each(function(){
ids+=","+$(this).text();
});
ids=ids.substring(1);
$("#delIdsHidden").val(ids);
window.parent.openModalDialog(450, 180, "删除菜单", $("#delDataDiv").html());
$(parent.document).find("#delIdsHidden").val(ids);
} else {
messageBox("提示","请选择数据!");
}
}
解决方案 »
- 求教一个用java转换格式的问题~
- 请晒晒宝贵经验-单一登录实现
- SSH执行getHibernateTemplate().save()方法卡住,不向下执行了
- 有Hibernate中是否能调用存储过程
- insert数据库错误
- 运行jsp时出错,大侠来看看
- servlet编译出错,请指点!在线等!
- 用JSP编写一个在线播放音乐系统
- 为什么在两个action中得到的sessionID不一样?
- 求助:socket获取数据报错
- java远程连接sqlserver2000数据库非常慢,其时间主要花在getConnection上
- com.microsoft.sqlserver.jdbc.SQLServerException: 索引 2 超出范围
function delData(com, grid) {
if ($('.trSelected', grid).length > 0) { //在grid中找class=trSelected的行
var ids ="";
$('.trSelected td:nth-child(1)',grid).each(function(){ //在grid中找class=trSelected的中的第一个td
ids+=","+$(this).text(); //拼接td的内容
});
ids=ids.substring(1); //去掉第一个,
$("#delIdsHidden").val(ids);
window.parent.openModalDialog(450, 180, "删除菜单", $("#delDataDiv").html());
$(parent.document).find("#delIdsHidden").val(ids);
} else {
messageBox("提示","请选择数据!");
}
}
这个JS估计是从一个table中找到所有tr class=trSelected中第一个td,然后把该td中的内容拼接好传到主界面,大概是这个意思。。