欢迎来到天天文库
浏览记录
ID:17305234
大小:30.50 KB
页数:4页
时间:2018-08-29
《html的5种页面跳转方式》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、HTML页面跳转的5种方法下面列了五个例子来详细说明,这几个例子的主要功能是:在5秒后,自动跳转到同目录下的hello.html(根据自己需要自行修改)文件。1)html的实现 ?123456
2、iles中无法使用 2)javascript的实现 ?123456 //以下方式直接跳转window.location.href='hello.html';//以下方式定时跳转setTimeout("javascript:location.href='hello.html'",5000); he"governingforthepeople","Nomattertheinterestsofthemasses"c
3、onceptunderstandingisnotinplace.Thespecificworktreatswiththedeployment,afewleadingcadrescomplainthatworkistoocomplicated,toomuchresponsibility,thepressureistoolarge,toomuchemphasisonthedifficultyofthework.Forexample,noncoalmine优点:灵活,可以结合更多的其他功能缺点:受
4、到不同浏览器的影响3)结合了倒数的javascript实现(IE) ?1234567895 varsecond=totalSecond.innerText; setInterval("redirect()",1000); functionredirect(){ totalSecond.innerText=--second; if(second<0)lo
5、cation.href='hello.html'; } 优点:更人性化缺点:firefox不支持(firefox不支持span、div等的innerText属性)3')结合了倒数的javascript实现(firefox)?12345678 varsecond=document.getElementById('totalSecond').textContent; setInterval("r
6、edirect()",1000); functionredirect() { document.getElementById('totalSecond').textContent=--second; if(second<0)location.href='hello.html'; } he"governingforthepeople","Nomattertheinterestsofthemasses"conceptunderstandingisnotinplace.Thespecificworktreatswi
7、ththedeployment,afewleadingcadrescomplainthatworkistoocomplicated,toomuchresponsibility,thepressureistoolarge,toomuchemphasisonthedifficultyofthework.Forexample,noncoalmine94)解决Firefox不支持innerText的问题?1234567858、guage="javascript"type="text/javascript"> if(navigator.appName.indexOf("Explorer")>-1){ document.getElementById('totalSecond').innerText="mytextinnerText"; }else{ document.getElementById('totalSecond')
8、guage="javascript"type="text/javascript"> if(navigator.appName.indexOf("Explorer")>-1){ document.getElementById('totalSecond').innerText="mytextinnerText"; }else{ document.getElementById('totalSecond')
此文档下载收益归作者所有