easyui linkbutton 由上选择到下 自由选择
// 编辑通知书点击事件 begin$(function(){//选择并添加名称为PRODUCT_ID的LINKBUTTON按钮$("#btnEdit").click(function(){var procudut_id = [];var rows = $('#guestDatagridEdit').datagrid('getSelections');//从datagrid获取选择的数据列if(rows!=null&&rows!=""){for(var i=0; i<rows.length; i++){index++;var row = rows[i];procudut_id.push(row.name);map_idtoproduct.put(row.name,row.obid);selection_id.push(row.obid);var btnid = "btn_" + index;var linkButton = "<a id ="+btnid+" class ='lbt'></a>";$('#link_button_areaEdit').append(linkButton);$("#"+btnid).linkbutton({iconCls : 'icon-search',text : procudut_id[i]});}}for(var i=0; i<map_idtoproduct.length; i++){//从ajax请求回的map中获取数据index++;var row = map_idtoproduct[i];procudut_id.push(row.key);map_idtoproduct.put(row.key,row.value);selection_id.push(row.value);var btnid = "btn_" + index;var linkButton = "<a id ="+btnid+" class ='lbt'></a>";$('#link_button_areaEdit').append(linkButton);$("#"+btnid).linkbutton({iconCls : 'icon-search',text : procudut_id[i]});}})var length = 0;$(".2bt").live("click", function(){var v = $(this).attr('id');var product_name = $(this).text();linkbutton_id[length] = map_idtoproduct.get(product_name);$.messager.confirm('请确认', '您要删除所选择的'+product_name+'?', function(r) {if (r) {//alert(map_idtoproduct.get(product_name) + "12w3");click_remove.push(map_idtoproduct.get(product_name));//将用户点击的并且打算去除的贵宾Id放入数组$('#'+v).remove();}else{return;}});length++;})})// 编辑通知书点击事件 end