如果我按“添加行”按钮,我必须调用div id =“ addObjectForm ” 这是我的示例代码。
<div class="row mt" id="addObjectForm">
<div class="col-sm-1">
<button type="button" id="addRowButton">Add Row</button>
</div>
</div>
提前致谢
答案 0 :(得分:0)
在下面的代码中找到jQuery ....
df['category'] = df['title'].str.findall('|'.join(console_list))
print (df)
title category
1 Nier Automata (PS4) [PS4]
2 Halo 5 Xbox One [Xbox One]
$('#addRowButton').click(function(e){
var id = $(this).closest('.mt').attr('id');
alert('ID : '+id);
});