jquery ajax load

来源:互联网 发布:网络信息安全书籍推荐 编辑:程序博客网 时间:2024/04/29 18:49
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style type="text/css"> 
</style> 
<script src="../js/jquery-1.8.3.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$("#send").click(function(){
$("#resText").load("jqueryloadhtml.html");
})
})
</script>
<body>
    <input type="button" id="send" value="Ajax提交" />
    <div class="comment">已有评论:</div>
    <div id="resText"></div>
</body>

</html>

==============空白用来嵌入div的==================================================================

<div   class="comment">
    已有评论:
    </div>
    <div   class="comment">
    <h6>张山:</h6>
        <p class="para">沙发。</p>
    </div>
     <div   class="comment">
    <h6>李四:</h6>
        <p class="para">地板。</p>
    </div>
     <div class="comment">
    <h6>小屋:</h6>
        <p class="para">水泥。</p>
    </div>

原创粉丝点击