easyui linkbutton 위에서 아래로 자유롭게 선택

2250 단어 easyui

//   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


좋은 웹페이지 즐겨찾기