怎么用提交键打开另一个html网页?

来源:百度知道 编辑:UC知道 时间:2024/06/14 12:34:02
最好还告诉我是在同一页面不停的打开不同的html页面的方法,谢谢各位啦。

<form name="input" action="提交后跳转网页的地址.html" method="get">
Username: 
<input type="text" name="name" />
<input type="submit" value="提交" />
</form>

在action里面写入 你要跳转的那个网页的地址就可以。

我又给你修改了下:

<html>
<head>
<script>
var i=-1;
function fun(){
//方法一
window.location.href="http://www.baidu.com";
//方法二
window.open("http://www.baidu.com");
}

function fun2(){
var url;
i++;
if(i==0) url="http://www.baidu.com";
else if(i==1) url="