$(function(){
$('#send').click((){
$.ajax({
type: "GET",url: "test.json").val()},dataType: "json"(data){
$('#resText').empty(); //清空resText里面的所有内容 var html = '';
$.each(data,(commentIndex,comment){
html += '<div class="comment"><h6>' + comment['username'] + ':</h6><p class="para"' + comment['content'] + '</p></div>';
});
$('#resText').html(html);
}
});
});
});
<script type="text/javascript">
jQuery('.yd_content').load('yuding_tab0.html');
jQuery.ajax({
url:"yuding_tab0.html""html"(data){
jQuery('.yd_content').html(data);
},error: (){
alert('error');
}
});
<script>
<script type="text/javascript">
jQuery('.jiudian_content .tab li').bind('click'(){
var _index=jQuery(this).index();
jQuery.ajax({
url:"yuding_tab"+_index+".html"(data){
jQuery('.yd_content').html(data);
yuding();
},1)">(){
alert('error');
}
});
})
</script>