点击列表中的按钮弹出div,
<script src="${base}/js/artDialog4.1.7/artDialog.js?skin=chrome" type="text/javascript"></script>
$("span[name='designatedGoods']").each(function () {
$(this).click(function () {var id = $(this).attr("rowid");
var url = "/coupon/getDesignatedGoods.ajax";
var html="";
$.ajax({
type: "POST",
url:url,
data: "couponTypeId="+id,
dataType:'json',
success: function(data){
html = html + "<table class='table bordered'>";
html = html + "<tr>";
html = html + "<td>商品ID</td>"
html = html + "<td>商品名称</td>";
html = html + "</tr>";
for(var i = 0; i < data.data.length; i++){
html = html + "<tr>";
html = html + "<td>"+data.data[i].goodsId+"</td>"
html = html + "<td>"+data.data[i].name+"</td>";
html = html + "</tr>";
}
html = html + "</table>"
$("#designatedGoodsDiv").html(html);
var d = $("#designatedGoodsDiv").dialog({
modal : true,
width : 600,
buttons : {
"关闭" : function() {
$("#designatedGoodsDiv").dialog("close");
}
}
});
}
});
});
});