运行结果尺寸: 300 x 150
x
 
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript</h2>
<h3>window.location 对象</h3>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
"网页路径是:" + window.location.pathname;
</script>
</body>
</html>
×

报个问题: