Switch 语句:展示图像指南
P粉557957970
P粉557957970 2024-01-29 13:17:59
[HTML讨论组]

我正在制作一个质量效应人格测验,该测验改编自 90 年代的 EasyDamus D&D 测验,但我在使用结果页面时遇到了问题。也就是说,我试图包含一个图像来匹配每个结果,但当代码使用 switch 语句实现结果时,我不知道该怎么做。这是代码片段:

var win = window.open("", "win","width=900,height=550,top=25,left=50,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes");

with (win.document) {
    open("text/html", "replace");
        
    write("Your Results Are In!\<\/title>\<\/head>");
            write("<body text='#FFFFFF' font-family='massEffect' link='#5555FF' vlink='#6666EE' bgcolor='#F2ECDA' background='images/space.png'>");

    write("<center><h2><b><font color='#FFFFFF'>You Are A:\<\/font>\<\/b>\<\/h2>\<\/center>");
    write("<br><center><h1><b>");
            
    
    switch (race) {
        case "human": write("Human\<\/b> "); break;
        case "asari": write("Asari\<\/b> "); break;
        case "turian": write("Turian\<\/b> "); break;
        case "salarian": write("Salarian\<\/b> "); break;
        case "krogan": write("Krogan\<\/b> "); break;
        case "quarian": write("Quarian\<\/b> "); break;
        case "geth": write("Geth\<\/b> "); break;
        case "volus": write("Volus\<\/b> "); break;
        case "rachni": write("Rachni\<\/b> "); break;
        case "batarian": write("Batarian\<\/b> "); }

    switch (primclass) {
        case "soldier": write(" Soldier"); break;
        case "infiltrator": write(" Infiltrator"); break;
        case "engineer": write(" Engineer"); break;
        case "adept": write(" Adept"); break;
        case "sentinel": write(" Sentinel"); break;
        case "vanguard": write(" Vanguard"); }

    switch (secclass) {
        case "soldier": write("/Soldier"); break;
        case "infiltrator": write("/infiltrator"); break;
        case "engineer": write("/Engineer"); break;
        case "adept": write("/Adept"); break;
        case "sentinel": write("/Sentinel"); break;
        case "none": write(""); break;
        case "vanguard": write("/Vanguard"); }



write("<br><h2><br>Race:<br></h2>");

    switch (race) {
    case "human": `</pre>
<p>最后一行是每个结果的风味文本,虽然它的显示方式没有问题,但我正在尝试找到一种在其前面放置图像的方法。我有可用的图片,其中大部分都是从本地文件夹调用的数组。让图像出现的最佳方式是什么?</p>
<p>我已经搜索了几周的解决方案,其中大多数都推荐事件侦听器,但我一直无法让它为我工作。</p>            </div>
            <div class="share flexRow">
                <div class="shareReply flexColumn shareDiv">
                    <a href="javascript:;"><img class="sharerImg" src="/static/images/images/icon50.png" data-id="1"></a>
                    <span class="sharerSpan">1</span>
                </div>

                <div class="shareLike flexColumn shareDiv" onclick="ask_comment_good(174192)">
                    <a href="javascript:;" >
                                                    <img class="sharerImg" src="/static/images/images/icon52.png" data-id="2">
                                            </a>
                    <span class="sharerSpan">0</span>
                </div>


                <div class="shareLDz flexColumn shareDiv dzdiv dzdiv1 aiaskgoodICollection" data-id="">
                    <a href="javascript:;" >
                                                    <img class="sharerImg " src="/static/images/images/icon37.png" data-id="5">
                                            </a>
                    <span class="sharerSpan">0</span>
                </div>




            </div>
            <script>
                $('.jbtitleimg').on('click',function(){
                    $("#layuitc").hide()
                    var layer = layui.layer;
                    layer.closeAll();
                })
                $('.jbbtn').on('click',function(){
                    $("#layuitc").hide()
                    var layer = layui.layer;
                    layer.closeAll();
                })
                $('.sharerImg').mouseenter(function(e){
                    var dataId = e.currentTarget.dataset.id
                    if(dataId == 1){
                        // $('.shareReply').find('img').attr('src','/static/images/images/icon51.png')
                    }else if(dataId == 2){
                        // $('.shareLike').find('img').attr('src','/static/images/images/icon53.png')
                    }else if(dataId == 4){
                        $('.shareShare').find('img').attr('src','/static/images/images/icon55.png')
                    }else{

                    }

                })
                $('.sharerImg').mouseleave(function(e){
                    var dataId = e.currentTarget.dataset.id
                    if(dataId == 1){
                        // $('.shareReply').find('img').attr('src','/static/images/images/icon50.png')
                    }else if(dataId == 2){
                        // $('.shareLike').find('img').attr('src','/static/images/images/icon52.png')
                    }else if(dataId == 4){
                        $('.shareShare').find('img').attr('src','/static/images/images/icon54.png')
                    }
                })
            </script>
            <!--            <div class="reply">-->
            <!---->
            <!--                <div class="replyTop flexRow">-->
            <!--                    <div class="retLeft flexRow">-->
            <!--                        <img src="/static/images/examples/text55.png" class="retlAvatar" >-->
            <!--                        <span class="retlName">飞儿</span>-->
            <!--                    </div>-->
            <!--                    <a href="#"><img src="/static/images/images/icon-del.png" class="retRight"></a>-->
            <!--                </div>-->
            <!--                <img src="/static/images/examples/text26.jpg" class="replyTextarea">-->
            <!--                <button type="button" class="replayBtn">回答</button>-->
            <!--            </div>-->

            <div id="commentinput" class="info detail-comment-input layui-hide-sm">
                <div class="detail-ci-avator">
                    <img src="https://www.php.cn/static/images/user_avatar.jpg" alt="P粉557957970"/>
                    <div class="detail-r">
                        <span class="detail-name">P粉557957970</span>
                        <p class="detail-signal"></p>
                    </div>
                </div>
                <div id="js-reply-wrap">
                    <div id="js-reply-editor-box" class="wd-comment-box js-ci-inner edui-imooc"></div>
                    <div class="qa-ci-footer">
                        <div class="qa-ci-footright">
                            <button id="js-wenda-ci-submit" class="detail-btn" data-qid="174192">回答</button>
                        </div>
                    </div>
                </div>
            </div>
            <div id="pinglundeplace" class="allReply ask-reply-all-list comments-content">
                <div class="arTop flexRow">
                    <div class="artLeft flexRow fontBold fontColor1">全部回复<b class="artlb colorGrey">(1)</b></div>
                    <button class="artBtn ask-comment-answer">我来回复</button>
                </div>
                <div class="allReplayLine"></div>

                                <div class="wdsyConDiv flexRow ask_top_ul">
                    <img src="https://www.php.cn/static/images/user_avatar.jpg" alt="P粉413704245" class="wdcdImg">
                    <div class="wdcdContent flexColumn">
                        <div class="wdcdContentReply">
                            <div class="wdxqrcTop flexRow">
                                <a href="/member/1271449.html" target="_blank" class="wdcdcName">P粉413704245<b class="wdxqRcT colorGrey">2024-01-30 11:27:51</b></a>
                                <span class="wdxqrcTopspan colorGrey">1楼</span>
                            </div>
                            <div class="wdcdcCons"><p>这段代码做了很多事情。首先,对于 switch 语句,它应该为特定情况设置一些变量。另外,为每个 switch 语句提供 <code>default</code> 案例始终是一个好习惯。</p>
<pre class="brush:php;toolbar:false;">function decideOnRace(race) {
    let result = '';
    switch (race) {
        case "human":
            result = "Human\ ";
            break;
        default:
            result = 'something else";
            break;
    }
}

// place this accordingly
const raceTextToWrite = decideOnRace(race);
write(raceTextToWrite);</pre>
<p>在所有不同的情况下遵循这种做法应该会帮助你进步,例如,对于 secclass、primclass 等。</p></div>
                            <div class="wdcdcInfo flexRow">
                                <a href="javascript:ask_reply_good(258351)"> <img class="wdxqindz" src="/static/images/images/icon27.png"></a>
                                <span class="wdxqindzspan">赞 <b>+0</b></span>
                                <div class="wdcdcileft">
                                    <a href="javascript:;" class="wdcdciSpan reply">添加回复</a>
                                </div>
                            </div>
                                                            <div class="wdcdContentReplyss" style="display: none;">
                                    <div class="reply textarea-con">
                                        <div class="replyTop flexRow">
                                            <div class="retLeft flexRow">
                                                <img src="https://www.php.cn/static/images/user_avatar.jpg" class="retlAvatar" >
                                                <span class="retlName">P粉557957970</span>
                                            </div>
                                            <!--                                                <a href="#"><img src="../images/images/icon-del.png" class="retRight"></a>-->

                                        </div>
                                        <textarea class="replaytext colorGrey" id="release-reply" placeholder="写下你的回复"></textarea>
                                        <button type="button" class="replayBtn do-reply-btn" data-id="258351">回复</button>
                                    </div>
                                </div>
                            
                            <div class="wdcdContentReplyss">
                                <ul class="replyssul">
                                    
                                </ul>

                            </div>


                        </div>
                    </div>

                </div>
                <div class="wdsyCondivLine"></div>
                



                <div></div>
            </div>
        </div>

        <!-- left end -->
        <div class="phpwzright wdxq">
            <a href="javascript:void(0);" onclick="publish_ask('发布话题',1)"><img src="/static/images/images/needtiwen.png"  class="wdxqrImg"></a>
            <div class="wzrTwo">
                <div class="wzrt-title">
                    <div>专题推荐</div>
                    <a href="/faq/zt">更多>
                    </a>
                </div>
                <div class="wzrtlist">

                    <ul>
                                                <li>
                            <a target="_blank" href="/faq/goyyzdysfynx"><img src="https://img.php.cn/upload/subject/202401/27/2024012711524590843.jpg?x-oss-process=image/resize,m_fill,h_96,w_156" /> </a>
                            <a target="_blank" href="/faq/goyyzdysfynx" class="title-a-spanl"><span>Go语言中的运算符有哪些</span> </a>
                        </li>
                                                <li>
                            <a target="_blank" href="/faq/wxddhzmbxs"><img src="https://img.php.cn/upload/subject/202412/10/2024121011433294231.jpg?x-oss-process=image/resize,m_fill,h_96,w_156" /> </a>
                            <a target="_blank" href="/faq/wxddhzmbxs" class="title-a-spanl"><span>微信打电话怎么不显示</span> </a>
                        </li>
                                                <li>
                            <a target="_blank" href="/faq/icpqjfx"><img src="https://img.php.cn/upload/subject/202402/01/2024020118015187897.jpg?x-oss-process=image/resize,m_fill,h_96,w_156" /> </a>
                            <a target="_blank" href="/faq/icpqjfx" class="title-a-spanl"><span>ICP币前景分析</span> </a>
                        </li>
                                                <li>
                            <a target="_blank" href="/faq/msconfigdbkzm"><img src="https://img.php.cn/upload/subject/202310/19/2023101917163175860.jpg?x-oss-process=image/resize,m_fill,h_96,w_156" /> </a>
                            <a target="_blank" href="/faq/msconfigdbkzm" class="title-a-spanl"><span>msconfig打不开怎么办</span> </a>
                        </li>
                                            </ul>
                </div>

            </div>
            <div class="wzrOne">

                <div class="wzroTitle">
                    <div> 热门话题 </div>
                    <!--                                <a href="/article.html" class="wzroTitlea">更多> </a>-->
                </div>
                <div class="wzroList">
                    <ul>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/730402.html">QQ邮箱格式怎么填写</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/1253345.html">QQ邮箱格式怎么填写 qq邮箱的格式怎么填</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/730403.html">qq邮箱的格式是什么</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/799443.html">节点是什么意思</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/1106205.html">比特币最全诞生至今历史价格表一览(2024年最新汇总)</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/1541743.html">俄罗斯引擎官方网址 俄罗斯搜索引擎官网入口链接</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/1186218.html">币安交易平台官网入口 币安交易平台的官方网站入口在哪里</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/743886.html">波币在哪购买?波币在哪个平台交易?</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/1690411.html">怎么在电脑上定闹钟时间设置_Windows系统闹钟设置全攻略</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzczzwzli">
                                <span class="layui-badge-dots wzrolr"></span>
                                <a target="_blank" href="/faq/821353.html">欧易okx2FA验证能同时在电脑和手机登陆吗</a>
                            </div>
                        </li>
                                            </ul>
                </div>
            </div>
            <div class="wzrThree">
                <div class="wzrthree-title">
                    <div>热门教程</div>
                    <a target="_blank" href="https://www.php.cn/k.html">更多>
                    </a>
                </div>
                <div class="wzrthreelist">
                    <div class="wzrthreeTab">
                        <div class="check tabdiv" data-id="one">相关教程 <div></div></div>
                        <div class="tabdiv" data-id="two">热门推荐<div></div></div>
                        <div class="tabdiv" data-id="three">最新课程<div></div></div>
                    </div>
                    <ul class="one">
                                            </ul>
                    <ul class="two" style="display: none;">
                                                <li>
                            <a target="_blank" href="/course/1656.html" title="JavaScript ES5基础线上课程教学" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/081/6862652adafef801.png" alt="JavaScript ES5基础线上课程教学"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/1656.html">JavaScript ES5基础线上课程教学</a>
                                <div class="wzrthreerb">
                                    <div >64937次学习</div>

                                                                            <a class="courseICollection" data-id="1656"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                                <li>
                            <a target="_blank" href="/course/812.html" title="最新ThinkPHP 5.1全球首发视频教程(60天成就PHP大牛线上培训班课)" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="最新ThinkPHP 5.1全球首发视频教程(60天成就PHP大牛线上培训班课)"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/812.html">最新ThinkPHP 5.1全球首发视频教程(60天成就PHP大牛线上培训班课)</a>
                                <div class="wzrthreerb">
                                    <div >1484960次学习</div>

                                                                            <a class="courseICollection" data-id="812"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                                <li>
                            <a target="_blank" href="/course/639.html" title="phpStudy极速入门视频教程" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/068/62611ef88fcec821.jpg" alt="phpStudy极速入门视频教程"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/639.html">phpStudy极速入门视频教程</a>
                                <div class="wzrthreerb">
                                    <div >529754次学习</div>

                                                                            <a class="courseICollection" data-id="639"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                                <li>
                            <a target="_blank" href="/course/379.html" title="独孤九贱(4)_PHP视频教程" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/001/5d1c6dfc9eb09885.jpg" alt="独孤九贱(4)_PHP视频教程"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/379.html">独孤九贱(4)_PHP视频教程</a>
                                <div class="wzrthreerb">
                                    <div >1249519次学习</div>

                                                                            <a class="courseICollection" data-id="379"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                                <li>
                            <a target="_blank" href="/course/801.html" title="PHP实战天龙八部之仿爱奇艺电影网站" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/001/5d2426f409839992.jpg" alt="PHP实战天龙八部之仿爱奇艺电影网站"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/801.html">PHP实战天龙八部之仿爱奇艺电影网站</a>
                                <div class="wzrthreerb">
                                    <div >769630次学习</div>

                                                                            <a class="courseICollection" data-id="801"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                            </ul>
                    <ul class="three" style="display: none;">
                                                <li>
                            <a target="_blank" href="/course/1696.html" title="最新Python教程 从入门到精通" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/081/68c135bb72783194.png" alt="最新Python教程 从入门到精通"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/1696.html">最新Python教程 从入门到精通</a>
                                <div class="wzrthreerb">
                                    <div >2726次学习</div>

                                                                            <a class="courseICollection" data-id="1696"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                                <li>
                            <a target="_blank" href="/course/1656.html" title="JavaScript ES5基础线上课程教学" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/081/6862652adafef801.png" alt="JavaScript ES5基础线上课程教学"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/1656.html">JavaScript ES5基础线上课程教学</a>
                                <div class="wzrthreerb">
                                    <div >64937次学习</div>

                                                                            <a class="courseICollection" data-id="1656"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                                <li>
                            <a target="_blank" href="/course/1655.html" title="PHP新手语法线上课程教学" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/081/684a8c23d811b293.png" alt="PHP新手语法线上课程教学"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/1655.html">PHP新手语法线上课程教学</a>
                                <div class="wzrthreerb">
                                    <div >6428次学习</div>

                                                                            <a class="courseICollection" data-id="1655"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                                <li>
                            <a target="_blank" href="/course/1654.html" title="支付宝沙箱支付(个人也能用的支付)" class="wzrthreelaimg">
                                <img src="https://img.php.cn/teacher/course/20240819/172406094466c31510e008b.jpg" alt="支付宝沙箱支付(个人也能用的支付)"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/1654.html">支付宝沙箱支付(个人也能用的支付)</a>
                                <div class="wzrthreerb">
                                    <div >4508次学习</div>

                                                                            <a class="courseICollection" data-id="1654"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                                <li>
                            <a target="_blank" href="/course/1650.html" title="麻省理工大佬Python课程" class="wzrthreelaimg">
                                <img src="https://img.php.cn/upload/course/000/000/067/66592dcfeb1b4698.png" alt="麻省理工大佬Python课程"/>
                            </a>
                            <div class="wzrthree-right">
                                <a target="_blank" href="/course/1650.html">麻省理工大佬Python课程</a>
                                <div class="wzrthreerb">
                                    <div >41271次学习</div>

                                                                            <a class="courseICollection" data-id="1650"><img src="/static/images/images/icon-small-nocollect.png" class="nofollow">收藏</a>
                                                                    </div>
                            </div>
                        </li>
                                            </ul>
                </div>
                <script>
                    $('.wzrthreeTab>div').click(function(e){
                        $('.wzrthreeTab>div').removeClass('check')
                        $(this).addClass('check')
                        $('.wzrthreelist>ul').css('display','none')
                        $('.'+e.currentTarget.dataset.id).show()
                    })
                </script>
            </div>
            <div class="wzrFour">
                <div class="wzrfour-title">
                    <div>最新下载</div>
                    <a href="/xiazai">更多>
                    </a>
                </div>

                                <script>
                    $(document).ready(function(){
                        var sjyx_banSwiper = new Swiper(".sjyx_banSwiperwz",{
                            speed:1000,
                            autoplay:{
                                delay:3500,
                                disableOnInteraction: false,
                            },
                            pagination:{
                                el:'.sjyx_banSwiperwz .swiper-pagination',
                                clickable :false,
                            },
                            loop:true
                        })
                    })
                </script>

                <div class="wzrfourList">
                    <div class="wzrfourlTab">
                        <div class="check" data-id="onef">网站特效 <div></div></div>
                        <div class="" data-id="twof">网站源码<div></div></div>
                        <div class="" data-id="threef">网站素材<div></div></div>
                        <div class="" data-id="fourf">前端模板<div></div></div>
                    </div>
                    <ul class="onef">
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a target="_blank"  title="jQuery企业留言表单联系代码" href="/xiazai/js/8071">[表单按钮] jQuery企业留言表单联系代码</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a target="_blank"  title="HTML5 MP3音乐盒播放特效" href="/xiazai/js/8070">[播放器特效] HTML5 MP3音乐盒播放特效</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a target="_blank"  title="HTML5炫酷粒子动画导航菜单特效" href="/xiazai/js/8069">[菜单导航] HTML5炫酷粒子动画导航菜单特效</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a target="_blank"  title="jQuery可视化表单拖拽编辑代码" href="/xiazai/js/8068">[表单按钮] jQuery可视化表单拖拽编辑代码</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a target="_blank"  title="VUE.JS仿酷狗音乐播放器代码" href="/xiazai/js/8067">[播放器特效] VUE.JS仿酷狗音乐播放器代码</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a target="_blank"  title="经典html5推箱子小游戏" href="/xiazai/js/8066">[html5特效] 经典html5推箱子小游戏</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a target="_blank"  title="jQuery滚动添加或减少图片特效" href="/xiazai/js/8065">[图片特效] jQuery滚动添加或减少图片特效</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a target="_blank"  title="CSS3个人相册封面悬停放大特效" href="/xiazai/js/8064">[相册特效] CSS3个人相册封面悬停放大特效</a>
                            </div>
                        </li>
                                            </ul>

                    <ul class="twof" style="display:none">
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/10961" title="思高网络商城CycooShop" target="_blank">[电商源码] 思高网络商城CycooShop</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/10960" title="短视频去水印微信小程序" target="_blank">[微信源码] 短视频去水印微信小程序</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/10959" title="微信分销商城电脑手机三合一" target="_blank">[电商源码] 微信分销商城电脑手机三合一</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/10958" title="V5Shop联盟系统" target="_blank">[电商源码] V5Shop联盟系统</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/10957" title="SSP网店系统单用户免费普及版" target="_blank">[电商源码] SSP网店系统单用户免费普及版</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/10956" title="宠物商店" target="_blank">[电商源码] 宠物商店</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/10955" title="多多校园交易网" target="_blank">[电商源码] 多多校园交易网</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/10954" title="生活同城信息网系统" target="_blank">[电商源码] 生活同城信息网系统</a>
                            </div>
                        </li>
                                            </ul>

                    <ul class="threef" style="display:none">
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/sucai/3847"  target="_blank"  title="美术颜料绘画工具合集矢量素材">[矢量素材] 美术颜料绘画工具合集矢量素材</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/sucai/3846"  target="_blank"  title="时尚冬季活动折扣传单A5模板设计下载">[psd素材] 时尚冬季活动折扣传单A5模板设计下载</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/sucai/3845"  target="_blank"  title="彩色秋季元素合集矢量素材">[矢量素材] 彩色秋季元素合集矢量素材</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/sucai/3844"  target="_blank"  title="美食卷海报传单PSD模板设计下载">[psd素材] 美食卷海报传单PSD模板设计下载</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/sucai/3843"  target="_blank"  title="冬季促销主题元素PSD分层素材下载">[psd素材] 冬季促销主题元素PSD分层素材下载</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/sucai/3842"  target="_blank"  title="特价旅行折扣海报PSD源文件设计下载">[psd素材] 特价旅行折扣海报PSD源文件设计下载</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/sucai/3841"  target="_blank"  title="复古文化宣传主题INS模板设计下载">[psd素材] 复古文化宣传主题INS模板设计下载</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/sucai/3840"  target="_blank"  title="黑色星期五汽车促销竖版海报PSD模板下载">[psd素材] 黑色星期五汽车促销竖版海报PSD模板下载</a>
                            </div>
                        </li>
                                            </ul>

                    <ul class="fourf" style="display:none">
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/8590"  target="_blank" title="驾照考试驾校HTML5网站模板">[前端模板] 驾照考试驾校HTML5网站模板</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/8589"  target="_blank" title="驾照培训服务机构宣传网站模板">[前端模板] 驾照培训服务机构宣传网站模板</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/8588"  target="_blank" title="HTML5房地产公司宣传网站模板">[前端模板] HTML5房地产公司宣传网站模板</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/8587"  target="_blank" title="新鲜有机肉类宣传网站模板">[前端模板] 新鲜有机肉类宣传网站模板</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/8586"  target="_blank" title="响应式天气预报宣传网站模板">[前端模板] 响应式天气预报宣传网站模板</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/8585"  target="_blank" title="房屋建筑维修公司网站CSS模板">[前端模板] 房屋建筑维修公司网站CSS模板</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/8584"  target="_blank" title="响应式志愿者服务网站模板">[前端模板] 响应式志愿者服务网站模板</a>
                            </div>
                        </li>
                                                <li>
                            <div class="wzrfourli">
                                <span class="layui-badge-dots wzrflr"></span>
                                <a href="/xiazai/code/8583"  target="_blank" title="创意T恤打印店网站HTML5模板">[前端模板] 创意T恤打印店网站HTML5模板</a>
                            </div>
                        </li>
                                            </ul>

                </div>
                <script>
                    $('.wzrfourlTab>div').click(function(e){
                        $('.wzrfourlTab>div').removeClass('check')
                        $(this).addClass('check')
                        $('.wzrfourList>ul').css('display','none')
                        $('.'+e.currentTarget.dataset.id).show()
                    })
                </script>
            </div>

        </div>
    </div>
</div>
<!--主体 end-->
<!--底部-->

<!--底部 end-->
<div class="phpFoot">
    <div class="phpFootIn">
        <div class="phpFootCont">
            <div class="phpFootLeft">
                <dl>
                    <dt>
                        <a href="/about/us.html" rel="nofollow" target="_blank" title="关于我们" class="cBlack">关于我们</a>
                        <a href="/about/disclaimer.html" rel="nofollow" target="_blank" title="免责申明" class="cBlack">免责申明</a>
                        <a href="/about/jbzx.html" rel="nofollow" target="_blank" title="举报中心" class="cBlack">举报中心</a>
                        <a href="javascript:;" rel="nofollow" onclick="advice_data(99999999,'意见反馈')"   title="意见反馈" class="cBlack">意见反馈</a>
                        <a href="https://www.php.cn/teacher.html" rel="nofollow"  target="_blank" title="讲师合作" class="cBlack">讲师合作</a>
                        <a href="https://www.php.cn/blog/detail/20304.html" rel="nofollow" target="_blank" title="广告合作" class="cBlack">广告合作</a>
                        <!--<a href="javascript:;" target="_blank" title="其他合作" class="cBlack">其他合作</a>-->
                        <a href="/new/"   target="_blank" title="最新文章列表" class="cBlack">最新更新</a>
                        <a href="https://global.php.cn/"   target="_blank" title="English" class="cBlack">English</a>
                                                <div class="clear"></div>
                    </dt>
                    <dd class="cont1">php中文网:公益在线php培训,帮助PHP学习者快速成长!</dd>
                    <dd class="cont2">
                      <span class="ylwTopBox">
                        <a href="javascript:;"  class="cBlack"><b class="icon1"></b>关注服务号</a>
                        <em style="display:none;" class="ylwTopSub">
                          <p>微信扫码<br/>关注PHP中文网服务号</p>
                          <img src="/static/images/examples/text16.png"/>
                        </em>
                      </span>
                        <span class="ylwTopBox">
                        <a href="tencent://message/?uin=27220243&Site=www.php.cn&Menu=yes" target="_blank" class="cBlack"><b class="icon2"></b>技术交流群</a>
                        <em style="display:none;" class="ylwTopSub">
                          <p>QQ扫码<br/>加入技术交流群</p>
                          <img src="/static/images/examples/text18.png"/>
                        </em>
                      </span>
                        <div class="clear"></div>
                    </dd>
                </dl>
                
            </div>
            <div class="phpFootRight">
                <div class="phpFootMsg">
                    <span><img src="/static/images/examples/text17.png"/></span>
                    <dl>
                        <dt>PHP中文网订阅号</dt>
                        <dd>每天精选资源文章推送</dd>
                    </dl>
                </div>
                <div class="phpFootMsg">
                    <span><img src="/static/images/examples/text14.png"/></span>
                    <dl>
                        <dt>PHP中文网APP</dt>
                        <dd>随时随地碎片化学习</dd>
                    </dl>
                </div>
            </div>
        </div>
    </div>
    <div class="phpFootCode">
        <div class="phpFootCodeIn"><p>Copyright 2014-2025 <a href="https://www.php.cn/" target="_blank">https://www.php.cn/</a> All Rights Reserved | php.cn | <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">湘ICP备2023035733号</a></p><a href="http://www.beian.gov.cn/portal/index.do" rel="nofollow" target="_blank"><b></b></a></div>
    </div>
</div>
<input type="hidden" id="verifycode" value="/captcha.html">
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?c0e685c8743351838d2a7db1c49abd56";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script>

<span class="layui-hide"><script type="text/javascript" src="https://s4.cnzz.com/z_stat.php?id=1280886301&web_id=1280886301"></script></span>

<!--
    <div class="phpFudong">
        <div class="phpFudongIn">
            <div class="phpFudongImg"></div>
            <div class="phpFudongXue">登录PHP中文网,和优秀的人一起学习!</div>
            <div class="phpFudongQuan">全站<span>2000+</span>教程免费学</div>
            <div class="phpFudongCode"><a href="javascript:;" id="login" title="微信扫码登录">微信扫码登录</a></div>
            <div class="phpGuanbi" onclick="$('.phpFudong').hide();"></div>
            <div class="clear"></div>
        </div>
    </div>
--><!--侧导航-->
<style>
    .layui-fixbar{display: none;}
</style>
<div class="phpSdhBox" style="height:240px !important;">
    <li>
        <div class="phpSdhIn">
            <div class="phpSdhTitle">
                <a href="/k24.html" target="_blank" class="hover" title="PHP学习">
                    <b class="icon1"></b>
                    <p>PHP学习</p>
                </a>
            </div>
        </div>
    </li>
    <li>
        <div class="phpSdhIn">
            <div class="phpSdhTitle">
                <a href="https://www.php.cn/blog/detail/1047189.html" target="_blank">
                    <b class="icon2"></b>
                    <p>技术支持</p>
                </a>
            </div>
        </div>
    </li>
    <li>
        <div class="phpSdhIn">
            <div class="phpSdhTitle">
                <a href="#">
                    <b class="icon6"></b>
                    <p>返回顶部</p>
                </a>
            </div>
        </div>
    </li>
</div>
<!--侧导航 end-->


<script src="/static/layui/layui.all.js"></script>
<script src="/static/ueditor/ueditor.config.js"></script>
<script src="/static/ueditor/ueditor.user.all.js"></script>
<script src="/static/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<script type="text/javascript" src="/static/video/video.js?1.7" charset="UTF-8"></script>
<link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all'/>
<script type='text/javascript' src='/static/js/viewer.min.js?1'></script>
<script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script>
<script type="text/javascript" src="/static/js/global.min.js?5.5.33"></script>
<script>$('.isAct-attr').viewer();</script>

</body>
</html>