jq问题2
刚才那段html是在ajax中的data生成的,如果如图这样是不是拿不到obj,这该怎么处理~
[解决办法]
$(function(){
$.ajax({
type: "post",
dataType: "text",
url: "hrmlpagecontrol.ashx?id=1",
success: function(data) {
$("#selectList").html(data);
$("#btn_select").click(function() {
var obj = $('#showselect div').map(function() {
return $(this).find('span').text() + ':' + $(this).find('label').text();
}).get().join();
$.ajax({
type: "post",
dataType: "text",
url: "responsesqlwhere.ashx?params=" + obj,
success: function(data) {
$("#showsqlwhere").html(data);
}
});
// alert(data);
});
$("#selectList").find(".more").toggle(function() {
$(this).addClass("more_bg");
$(".more-none").show()
}, function() {
$(this).removeClass("more_bg");
$(".more-none").hide(); //这个地方,你都没有$符号。
});
}
});
});