⑴ html页面 跳转其他网址 完整代码
<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<title>Document</title>
</head>
<script>
window.location.href="http://..com/question/1303800286938553059.html?entry=qb_ihome_tag"
</script>
<body>
</body>
</html>
不显示内容 直接跳转到其他页面
⑵ 网页自动跳转代码html
<meta http-equiv="Refresh" content="3;URL=1111111.html" />
不会javaScript的话就用html语言也可以实现
content属性设置时间 url是目标页面。
放在haed中。
可以多个页面连续跳转~
页面首页代码:
<meta http-equiv="Refresh" content="3;URL=1111111.html" />
1111111.html页面的代码:
<meta http-equiv="Refresh" content="3;URL=2222222.html" />
2222222.htnl页面的代码:
<meta http-equiv="Refresh" content="3;URL=3333333.html" />
上面的代码先从首页开始3秒后进入1111111.html页面,再过3秒后进入2222222.html页面,再过3秒后进入3333333.html页面。
======================================================
因楼主没听懂 我直接发完整代码吧~
第一个文件 文件名为index.html 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<meta http-equiv="Refresh" content="5;URL=1.html" />
</head>
<body>
<h1>
此页的文件名为index.html<br />
这是第一个没面。。。。<br />
5秒后进入第二个页面。。。<br />
两个页面将循环转向。
</h1>
</body>
</html>
第二个文件 文件名为1.html 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<meta http-equiv="Refresh" content="5;URL=index.html" />
</head>
<body>
<h3>
此页的文件名为1.html<br />
这是第二个没面。。。。<br />
5秒后进入第一个页面。。
</h3>
</body>
</html>
=================完
这里关键标签就是<meta http-equiv="Refresh" content="5;URL=1.html" />
和<meta http-equiv="Refresh" content="5;URL=index.html" />
其他你可以不看~ 这个绝对可以,我已经试了。
⑶ 如何用html代码 实现页面跳转
下面列了五个例子来详细说明,这几个例子的主要功能是:在5秒后,自动跳转到同目录下的hello.html(根据自己需要自行修改)文件。
1、html的实现
<head>
<!--以下方式只是刷新不跳转到其他页面-->
<metahttp-equiv="refresh"content="10">
<!--以下方式定时转到其他页面-->
<metahttp-equiv="refresh"content="5;url=hello.html">
</head>
优点:简单;
缺点:Struts Tiles中无法使用。
2、javascript的实现
<scriptlanguage="javascript"type="text/javascript">
//以下方式直接跳转
window.location.href='hello.html';
//以下方式定时跳转
setTimeout("javascript:location.href='hello.html'",5000);
</script>
优点:灵活,可以结合更多的其他功能;
缺点:受到不同浏览器的影响。
3、结合了倒数的javascript实现(IE)
<spanid="totalSecond">5</span>
<scriptlanguage="javascript"type="text/javascript">
varsecond=totalSecond.innerText;
setInterval("redirect()",1000);
functionredirect(){
totalSecond.innerText=--second;
if(second<0)location.href='hello.html';
}
</script>
优点:更人性化;
缺点:firefox不支持(firefox不支持span、div等的innerText属性)。
4、解决Firefox不支持innerText的问题
<spanid="totalSecond">5</span>
<scriptlanguage="javascript"type="text/javascript">
if(navigator.appName.indexOf("Explorer")>-1){
document.getElementById('totalSecond').innerText="mytextinnerText";
}else{
document.getElementById('totalSecond').textContent="mytexttextContent";
}
</script>
5、整合3)和3')
<spanid="totalSecond">5</span>
<scriptlanguage="javascript"type="text/javascript">
varsecond=document.getElementById('totalSecond').textContent;
if(navigator.appName.indexOf("Explorer")>-1){
second=document.getElementById('totalSecond').innerText;
}else{
second=document.getElementById('totalSecond').textContent;
}
setInterval("redirect()",1000);
functionredirect(){
if(second<0){
location.href='hello.html';
}else{
if(navigator.appName.indexOf("Explorer")>-1){
document.getElementById('totalSecond').innerText=second--;
}else{
document.getElementById('totalSecond').textContent=second--;
}
}
}
</script>
⑷ html按钮跳转网页代码怎么回事
这是设置的问题,<a href="你要跳转到的页面的网址">按钮标签</a>,具体操作方法如下:
1、首先,我们新建一个带有button按钮的页面,在Dreamweaver中打开这个页面。
⑸ php或html网页跳转代码
<table style="width:100%; height:100%;">
<tr style="height:100%;">
<td style="text-align:left;width:170px;vertical-align:top;background-color:#9ACD32;">
<ul id="ull" style="">
<li id="a" onclick="danwei(this)">购进食材</li>
<li id="e" onclick="danwei(this)">食材消耗记录</li>
<li id="b" onclick="danwei(this)">维护食材信息</li>
<li id="c" onclick="danwei(this)">维护食材分类信息</li>
<li id="d" onclick="danwei(this)">维护单位信息</li>
</ul>
</td>
<td>
<iframe id="aa" src="shibiao.html" style="width:100%;height:100%;" scrolling="auto" frameborder="0"></iframe>
</td>
</tr>
</table>
<script>
function danwei(fan) {
if (fan.id == "d") {//判断 id为d 时执行下面语句
document.getElementById("aa").src = "danweixinxi.html";//找到id“aa” src=“单位信息.html”
} else if (fan.id == "a") {
document.getElementById("aa").src = "shibiao.html";//找到id“aa” src=“食表=食材表.html”
} else if (fan.id == "c") {
document.getElementById("aa").src = "shicaifeilei.html";
} else if (fan.id == "b") {
document.getElementById("aa").src = "shicai.html";
} else if (fan.id == "e") {
document.getElementById("aa").src = "shicaixiaohaojl.html";
}
}
</script>
⑹ html跳转代码
这个就是了,测试了好多种的,这个是5秒之后跳转的代码,时间可以自己改
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>5秒后跳转到另一个页面</title>
</head>
<script>
var t = 5;
var s = '.';
timeID=setInterval("countDown()",1000);
function countDown(){
time.innerHTML= t +"秒后跳转"+s;
t--;
s+='.';
if (t==0) {
location.href="http://www.51zuoyi.com/"; //【这边是要跳转的目标地址】
clearInterval(timeID);
}
}
</script>
<body>
<div><font ID="time" face="impact" color="#272822" size="7">即将跳转</font>
</div>
</body>
</html>
把目标网址改为自己的就可以实现跳转了,效果可以参考一下下面
⑺ html网页跳转代码怎么写
用<meta>里直接写刷新语句:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-CN">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="refresh" content="5;url=网址">
<title>html网页自动跳转代码</title>
</head>
<body>
测试:html网页自动跳转代码<br/>
你可以在这里写下你想的一切东西!<br />
</body>
</html>
⑻ html网页 实现自动跳转 完整代码
两种方法,一种是后台里直接跳转,比如Response.Redirect(url)
第二种是用JQuery配合JS跳转,
$(function(){
location.href
=
url;
})
或者纯JS:
document.ready(function(){
location.href
=
url;
})
⑼ html点击一个按钮,跳转到当前页面的另一个指定位置!这样的代码怎么写
建设网站时,经常会遇到需要跳转页面的情况,例如我们的网站分中英文版本,网站程序索引页不是直接放在根目录下,而是分别放在“en”和“cn“目录中区分中英版本。
打开网站时,想直接跳转到en目录访问英文版,则需要使用跳转代码跳转后方可以访问。通过html代码跳转页面的详细步骤:
1、打开Dreamweaver,新建html页面;
⑽ html页面网页跳转代码
<html>
<head>
<title>pageA</title>
<scripttype="text/javascript">
functiondelyLoad(){
setTimeout(function(){
window.location.href='b.html';
},5000)
}
</script>
</head>
<bodyonload="delyLoad()">
<h1>A</h1>
</body>
</html>