<script src='http://libs.baidu.com/jquery/1.10.2/jquery.min.js'></script>
<style>
h3{
position:relative;
width:50px;
background-color:#999;
}
.entry{
position:absolute;
top:0;
right:-70px;
}
</style>
<script>
$(document).ready(function() {
$('#letter-a a').click(function(event){
event.preventDefault();
$('#dictionary').load('a.html')
});
});
</script>
</head>
<body>
<div id='dictionary'>
<h2>the Devil's Dictionary</h2>
<div class='letters' id='letter-a'>
<h3><a href='a.html'>A</a></h3>
</div>
<div class='letters' id='letter-b'>
<h3><a href='a.html'>B</a></h3>
</div>
<div class='letters' id='letter-c'>
<h3><a href='a.html'>C</a></h3>
</div>
<div class='letters' id='letter-d'>
<h3><a href='a.html'>D</a></h3>
</div>
<div class='letters' id='letter-e'>
<h3><a href='a.html'>E</a></h3>
</div>
</div>
</body>
</html>
其中html片段的文件名是a.html,不知道是什么问题,没法运行,点击A后,没有反应。求大神指导。
22不小了
echo_kinchao
相关分类