📜  jquery 替换属性 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:47.393000             🧑  作者: Mango

代码示例2
$(newRow).find('[id*="rules"]').each(function(){
    // Update the 'rules[0]' part of the name attribute to contain the latest count 
    $(this).attr('name',$(this).attr('name').replace('rules\[0\]','rules\[$count\]'));
});