1、新建1.html编辑代码如下<挢旗扦渌;!DOCTYPE html PUBLIC "-//W3C//DTD XHT罄休卦咦ML 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><div id="top"></div><script src="jquery-1.12.3.min.js"></script><script>$.ajax({url:"2.html",async:false,type:"get",dataType:"html",success:function(msg){$("#top").html(msg);}}) </script><body></body></html>
2、新建2.html编辑代码111111111111111111111111111
3、运行1.html2.html的内容插入到了1.html的top div中