【发布时间】:2013-08-13 10:03:09
【问题描述】:
到目前为止,我所拥有的是:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
alert($("p").html());
});
});
</script>
</head>
<body>
<button>Return the content of the p element</button>
<p>Test Text</p>
</body>
</html>
它的作用是显示我页面的内容。但是假设我有另一个看起来像这样的 html 文件:
<html>
<head>
</head>
<body>
<p>This is text</p>
</body>
</html>
我将如何查看该页面的 html?
【问题讨论】: