Chrome中没有返回网站的Javascript控制台显示为html

时间:2015-03-06 16:50:07

标签: javascript google-chrome

当我在chrome中的JavaScript控制台中运行以下代码时:

var doc = document.documentElement.innerHTML;
prompt('test',doc);

我收到以下内容:

<head>
<title>****</title>
<style type="text/css">
/* Hide all indicators by default even css bundle is not loaded */
body > div.suspension-indicator-backdrop, body > div[class$='-indicator'] {
display: none;
}
</style>
<link href="/css/bundle/app?v=******" rel="stylesheet">
<!--[if IE]>
<script src="/css/bundle/ie?v=" crossorigin="anonymous"></script>
<![endif]-->
<script type="application/javascript" async="" defer="" src="https://****/track.js?_=****"; }
#intercom-container .intercom-conversation-embed .intercom-sheet-body {
border: none;
z-index: 0; }
#intercom-container .intercom-conversation-embed .intercom-comment-timestamp {
display: none; }
#intercom-container #intercom-embedded-launcher {
z-index: *****;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
height: 48px;
width: 48px;
position: relative; }
#intercom-container #intercom-embedded-launcher.intercom-launcher-with-preview {
width: 340px; }
</style><div id="intercom-launcher" class="intercom-launcher intercom-launcher-active"><div class="intercom-launcher-button"></div>
<div class="intercom-launcher-badge"></div>
<div class="intercom-launcher-preview">
<div class="intercom-launcher-preview-body"></div>
<div class="intercom-launcher-preview-caret"></div>
<div class="intercom-launcher-preview-close"></div>
</div>
</div><div id="intercom-messenger" class="intercom-messenger intercom-messenger-inactive"></div></div></body>

但是显示的页面包含我的提示中未返回的字段,按钮和其他元素。任何人都可以解释为什么会发生这种情况以及如何通过外部JavaScript访问这些元素?

0 个答案:

没有答案