<html >
<head>
<title>main files</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<div id="kk">
</div>
<script>
$("#kk").load("template.html");
var new_id="234";
$(#tkk).attr({
id : this.id + '_' + new_id,
name: this.name + '_' + new_id
});
</script>
</body>
</html>
<---------------------------------------------------- ----------------->
模板.html
<h2>Greetings</h2>
<div id="tkk" class="container">
<div class="inner">Hello</div>
<div class="inner">Goodbye</div>
</div>
在这里,我想在加载到 main.html 文件后更改 tkk 的 id,但它不起作用