<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>获取当前页的header</title>
</head>
<body >
<script type="application/javascript">
<!--
var x = window.XMLHttpRequest ? new window.XMLHttpRequest()
: new ActiveXObject("Microsoft.XMLHTTP");
x.open("GET",window.location.href, false);
x.send();
console.log(x.getAllResponseHeaders());
-->
</script>
</body>
</html>