如何定位 post_ad_cloned的输入子项?
var post_ad = $('.duplicate_name');
var post_ad_cloned = post_ad.clone().removeClass('duplicate_name').appendTo('#sss').show();
$("post_ad_cloned input").css('color', 'red');
答案 0 :(得分:5)
var post_ad = $('.duplicate_name');
var post_ad_cloned = post_ad.clone().removeClass('duplicate_name').appendTo('#sss').show();
$("input", post_ad_cloned).css('color', 'red');
或:
var post_ad = $('.duplicate_name');
var post_ad_cloned = post_ad.clone()
.removeClass('duplicate_name')
.appendTo('#sss')
.show()
.children('input')
.css('color', 'red');