ajax通过Jquery获取网页内容显示

<!DOCTYPE html>
<html>
  <head>
    <title>JqueryAjax.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<Script type="text/javascript" src="jquery-3.2.1.js" ></Script>
<script type="text/javascript">
	$(function(){
		$("a").click(function(){
			var url=this.href;
			var args={"time":new Date()};
			$("#d1").load(url,args);
			return false;
		});
	});
</script>
  </head>
  
  <body>
    <a href="../sunWeb/web1.html">点击我打开子网页</a>
   <div id="d1">
   
   </div>
  </body>
</html>

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43299461/article/details/85218286