var currentIndex = ++$indextemp;
alert(currentIndex);
var $divTemp = $("#interModel").clone();
$divTemp.find("[name^=results]").each(function(i){
var oldName = $(this).attr("name");
var newName = oldName.replace(/[0~9]+/,currentIndex);
$(this).attr("name",newName);
});
$divTemp.appendTo("#interTd");replace后没有把oldName中的数字替换为currentIndex,大家看看是什么问题