点击标签a获取它的值
勤奋小学僧 2015-12-28 05:40:46 $.post("actions/gettype.ashx", function (types) {
$(types).each(function (index, type) {
var divtype = $("<div class='divtype' id='type'></div>");
$("#divtype").append(divtype);
var $type = $("<a class='atype' onclick='a_click(this)'></a>");
$type.append("<h5>" + type.type_name + "</h5>");
divtype.append($type);
});
}, "json")
动态添加类型名
点击其中一个动态添加的类型名,获得他的值