你好.你的问题我大致给你写了一个DEMO.如果你还有问题.可以给我留言.代码如下:
----universities.html----
<li id="1">Universities 01</li>
<li id="2">Universities 02</li>
----course1.html----
<li id="Course01">University 01's Course 01</li>
<li id="Course02">University 01's Course 02</li>
----course2.html----
<li id="Course01">University 02's Course 01</li>
<li id="Course02">University 02's Course 02</li>
----demo.html----
//body
<button type="button" id="btnTest">List Universities</button>
<ul id="lstUniversities"></ul>
<ul id="lstCourses"></ul>
//script
$(document).ready(function(){
$('#btnTest').click(function(){
$('#lstUniversities').load('universities.html', function(){
$("#lstUniversities > li").each(function(){
var currentUniversityID = $(this).attr('id');
$(this).click(function(){
$('#lstCourses').load('course' + currentUniversityID + '.html', function(){
$('#lstCourses > li').each(function(){
$(this).click(function(){
alert("You've chosen University " + currentUniversityID + "'s " + $(this).attr('id'));
});
});
});
});
});
});
});
});