如何使用jquery或javascript导航到另一个文件?

如何使用jquery或javascript导航到另一个文件?,javascript,jquery,html,Javascript,Jquery,Html,我有下面给出的代码 <div id="content"> <h1>SITE INFORMATION!</h1> <div id="taskList"></div> <label for="taskName">Enter a site name:</label> <input type="text" id="taskName"></input> <label id="error" st

我有下面给出的代码

<div id="content">
<h1>SITE INFORMATION!</h1>
<div id="taskList"></div>
<label for="taskName">Enter a site name:</label>
<input type="text" id="taskName"></input>
<label id="error" style="display:none"></label>
<label for="taskName">Enter a site no:</label>
<input type="text" id="taskName"></input>
<label id="error" style="display:none"></label>
<input type="submit" id="submit" value="Submit" data-theme="b"></input>
<button type="next" onclick="go()">next</button>
<script> 
    function go(){
        // Some code  
    } 
 </script> 
 </div>

网站信息!
输入站点名称:
输入站点编号:
下一个
函数go(){
//一些代码
} 
但问题是单击“下一步”按钮时,我需要显示位于系统文件夹中的另一个文件(可能是.vm文件)。 该文件将在我的本地系统中,当我通过浏览器访问上述页面时,需要显示该文件

你能帮我定义一下“系统文件夹”吗

从技术上讲,您可以通过使用
onclick=“window.location.href=”/path/to/some/file'
来实现这一点,但如果您试图访问的文件高于您的web根目录,这将不起作用。

定义“系统文件夹”

从技术上讲,您可以通过使用
onclick=“window.location.href=”/path/to/some/file'
来实现这一点,但如果您试图访问的文件高于您的web根目录,这将不起作用。

定义“系统文件夹”

从技术上讲,您可以通过使用
onclick=“window.location.href=”/path/to/some/file'
来实现这一点,但如果您试图访问的文件高于您的web根目录,这将不起作用。

定义“系统文件夹”


从技术上讲,您可以通过使用
onclick=“window.location.href=”/path/to/some/file'
来实现这一点,但是如果您试图访问的文件高于您的web根目录,这将不起作用。

您不需要jQuery,简单的
window.location code
就可以做到这一点,例如:

window.location.href = myUrl;

window.location.href = "/somewhere/else";

您不需要jQuery,简单的
window.location code
就可以了,例如:

window.location.href = myUrl;

window.location.href = "/somewhere/else";

您不需要jQuery,简单的
window.location code
就可以了,例如:

window.location.href = myUrl;

window.location.href = "/somewhere/else";

您不需要jQuery,简单的
window.location code
就可以了,例如:

window.location.href = myUrl;

window.location.href = "/somewhere/else";

如果您需要将本页中请求的信息发送到下一页,最简单的方法是使用传统的HTML表单:

<form method="POST" action="./next.html">
  <label for="taskName">Enter a site name:</label>
  <input type="text" id="taskName"></input>
  <label id="error" style="display:none"></label>
  <label for="taskName">Enter a site no:</label>
  <input type="text" id="taskName"></input>
  <label id="error" style="display:none"></label>
  <input type="submit" id="submit" value="Submit" data-theme="b"></input>
  <input type="submit" name="submit" />
</form>

输入站点名称:
输入站点编号:

请注意,您的
现在是
,希望能有所帮助。

如果您需要将此页面中请求的信息发送到下一页,最简单的方法是使用传统的HTML表单:

<form method="POST" action="./next.html">
  <label for="taskName">Enter a site name:</label>
  <input type="text" id="taskName"></input>
  <label id="error" style="display:none"></label>
  <label for="taskName">Enter a site no:</label>
  <input type="text" id="taskName"></input>
  <label id="error" style="display:none"></label>
  <input type="submit" id="submit" value="Submit" data-theme="b"></input>
  <input type="submit" name="submit" />
</form>

输入站点名称:
输入站点编号:

请注意,您的
现在是
,希望能有所帮助。

如果您需要将此页面中请求的信息发送到下一页,最简单的方法是使用传统的HTML表单:

<form method="POST" action="./next.html">
  <label for="taskName">Enter a site name:</label>
  <input type="text" id="taskName"></input>
  <label id="error" style="display:none"></label>
  <label for="taskName">Enter a site no:</label>
  <input type="text" id="taskName"></input>
  <label id="error" style="display:none"></label>
  <input type="submit" id="submit" value="Submit" data-theme="b"></input>
  <input type="submit" name="submit" />
</form>

输入站点名称:
输入站点编号:

请注意,您的
现在是
,希望能有所帮助。

如果您需要将此页面中请求的信息发送到下一页,最简单的方法是使用传统的HTML表单:

<form method="POST" action="./next.html">
  <label for="taskName">Enter a site name:</label>
  <input type="text" id="taskName"></input>
  <label id="error" style="display:none"></label>
  <label for="taskName">Enter a site no:</label>
  <input type="text" id="taskName"></input>
  <label id="error" style="display:none"></label>
  <input type="submit" id="submit" value="Submit" data-theme="b"></input>
  <input type="submit" name="submit" />
</form>

输入站点名称:
输入站点编号:

请注意,您的
现在是
,希望它有所帮助。

您可以使用jQuery加载:

$( 'target' ).load( "you_file_path", function() {
    alert( "Load was performed." );
});

您可以使用jQuery加载:

$( 'target' ).load( "you_file_path", function() {
    alert( "Load was performed." );
});

您可以使用jQuery加载:

$( 'target' ).load( "you_file_path", function() {
    alert( "Load was performed." );
});

您可以使用jQuery加载:

$( 'target' ).load( "you_file_path", function() {
    alert( "Load was performed." );
});

使用
window.location
onclick=“window.location=”http://google.com“
使用
window.location
onclick=“window.location=”http://google.com“
使用
window.location
onclick=“window.location=”http://google.com“
使用
窗口。位置=“窗口位置”http://google.com“