Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在另一个HTML页面中显示HTML页面的一部分_Javascript_Jquery_Html_Splunk - Fatal编程技术网

Javascript 在另一个HTML页面中显示HTML页面的一部分

Javascript 在另一个HTML页面中显示HTML页面的一部分,javascript,jquery,html,splunk,Javascript,Jquery,Html,Splunk,我想通过另一个HTML页面(比如“page2.HTML”)显示非常大的HTML页面(比如“page1.HTML”)的特定部分,该页面将包含指向page1.HTML每个部分的链接。如何使用简单的javascript、jquery等实现这一点。page1.html实际上是通过splunk呈现的,page2.html是一个普通的html页面,它有指向page1.html各个部分的链接。这能实现吗 抱歉,无法提供图片,因为我的声誉低于10 让我澄清一下。在不同的服务器上有一系列应用程序(超过100个)。

我想通过另一个HTML页面(比如“page2.HTML”)显示非常大的HTML页面(比如“page1.HTML”)的特定部分,该页面将包含指向page1.HTML每个部分的链接。如何使用简单的javascript、jquery等实现这一点。page1.html实际上是通过splunk呈现的,page2.html是一个普通的html页面,它有指向page1.html各个部分的链接。这能实现吗

抱歉,无法提供图片,因为我的声誉低于10

让我澄清一下。在不同的服务器上有一系列应用程序(超过100个)。每个应用程序都包含一个母版页,如page1.html。在page2.html中有一个搜索框,我在其中键入或选择要查看其统计信息的应用程序。 这些部分是指我想查看的特定统计信息,假设我只想查看应用程序运行时的服务器统计信息,那么我将单击链接或按钮(在page2.html上),它将带我进入母版页(即page1.html)中显示相关信息的部分。类似地,如果我想查看应用程序统计信息,我将单击链接或按钮(在page2.html上),该链接或按钮将引导我进入母版页中显示应用程序统计信息的部分

以下是page2.html的代码:

<body class="simplexml preload locale-en">

<a class="navSkip" href="#navSkip" tabindex="1">Screen reader users, click here to skip the navigation bar</a>
<div class="header splunk-header">
    <div id="placeholder-splunk-bar">
        <a href="{{SPLUNKWEB_URL_PREFIX}}/app/launcher/home" class="brand" title="splunk &gt; listen to your data">splunk<strong>&gt;</strong></a>
    </div>
        <div id="placeholder-app-bar"></div>
</div>
<a id="navSkip"></a>
<div class="dashboard-body container-fluid main-section-body" data-role="main">
<div class="dashboard-header clearfix">
    <h2>Application Dashboard HTML</h2>
</div>
<div class="fieldset">
    <div class="input input-text" id="input1">
        <label>Application</label>
    </div>
</div>


<div id="row1" class="dashboard-row dashboard-row1">
    <div id="panel1" class="dashboard-cell" style="width: 100%;">
        <div class="dashboard-panel clearfix">

            <div class="panel-element-row">
                <div id="element1" class="dashboard-element html" style="width: 100%">
                    <div class="panel-body html">
                            <center><h1 class="golden_gradient">$tok_application$ Application Status Dashboard</h1></center>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="row2" class="dashboard-row dashboard-row2">
    <div id="panel2" class="dashboard-cell" style="width: 100%;">
        <div class="dashboard-panel clearfix">

            <div class="panel-element-row">
                <div id="element2" class="dashboard-element html" style="width: 100%">
                    <div class="panel-body html">
                            <table cellspacing="5" cellpadding="5" border="0" width="100%">
                                <tr>
                                    <td width="50%">
                                        <pre><a style="text-decoration: none" onclick="loadURL()"><font size="4"><p align="center"><b>Website Availability</b></p></font></a></pre>
                                    </td>
                                    <td width="50%">
                                        <pre><a style="text-decoration: none" onclick="loadDBStat()"><font size="4"><p align="center"><b>Database Availability</b></p></font></a></pre>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="50%">
                                        <pre><a style="text-decoration: none" onclick="loadBM()"><font size="4"><p align="center"><b>Batch Jobs</b></p></font></a></pre>
                                    </td>
                                    <td width="50%">
                                        <pre><a style="text-decoration: none" onclick="loadIT()"><font size="4"><p align="center"><b>Infrastructure Dashboard</b></p></font></a></pre>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="50%">
                                        <pre><a style="text-decoration: none" onclick="loadBusiness()"><font size="4"><p align="center"><b>Business Dashboard</b></p></font></a></pre>
                                    </td>
                                    <td width="50%">
                                        <pre><a style="text-decoration: none" onclick="loadCMRegression()"><font size="4"><p align="center"><b>Capacity Management Regression</b></p></font></a></pre>
                                    </td>
                                </tr>
                            </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="content"></div>
</div>
</body>

应用程序仪表板HTML
应用
$tok_应用程序$application Status仪表板

网站可用性

数据库可用性

批处理作业

基础架构仪表板

业务仪表板

容量管理回归

我想把母版页的部分印在里面


另外,我是一个新手,所以请提供一点详细的解释。提前感谢。

有一种使用iFrame显示web链接的方法


当链接的目标与iframe的名称匹配时,链接将在iframe中打开


[代码取自w3scools.com]

如果你想得到一个好的答案,你必须先学习一个合适的问题。你可以截取page1.html的屏幕截图,然后将其放在page2.html上吗?或者从page1.html复制html代码,然后将其添加到page2.html,我不太清楚您在寻找什么。无法提供屏幕截图,因为page1.html显示了一系列应用程序的实时统计信息。您能提供每个页面的示例吗?
<div id="content"></div>
<iframe width="100%" height="300px" src="demo_iframe.htm" name="iframe_a"></iframe>
<p><a href="http://www.w3schools.com" target="iframe_a">W3Schools.com</a></p>

<p>When the target of a link matches the name of an iframe, the link will open in the iframe.</p>