日期:2014-05-16 浏览次数:20348 次
function openNext(id,num){
num++;
var symbola = $("#i"+id).val();
//console.log("#i"+id);
if(symbola =="+"){
$.ajax({
type:"POST",
url:"/5akg4j/sysMenus/findSub",
data:{id:id},
dataType:"json",
error: function(){alert('加载错误,请重新操作。'); },
success:function(dates){
var records=dates.rows;
if(typeof(records) == "undefined") {
alert("没有子菜单");
return;
}
if(records.length==0){
alert("取得值为空");
}else{
for(var i=records.length-1; i>=0;i--){
var blank = "";
for(var j = 0;j<num;j++){
blank +=" ";
}
var str = "<tr id=\""+records[i].id+"\"><td align=\"center\"><input type=\"checkbox\" name=\"checkOne\""+
"id=\"checkOne\" value=\""+records[i].id+"\" /></td>"+
"<td align=\"left\">"+blank+records[i].id+"</td><td>";
if(records[i].subcount>0){
str += "<input type=\"button\" id=\"i"+records[i].id+"\" "+
"onclick=\"openNext("+records[i].id+","+num+")\" value=\"+\" ></button>";
}
str += "</td><td align=\"center\">"+records[i].name+"</td>"+
"<td align=\"center\">"+records[i].accurl+"</td>"+