微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何通过脚本更改 60 天的文本?

如何解决如何通过脚本更改 60 天的文本?

我是编程新手,所以请耐心等待,因为这可能很容易解决,但我确实没有太多实践。

我一直在开发一个自动的“每日小费”系统,前 3 个月(60 天)每天都有小费。

基本上是 60 天内每天更改文本的代码。 60 天后,我的想法是在第一天重置代码并返回到第一个提示

但是,当代码返回星期日 (0) 时,我似乎找不到让代码放置不同文本的方法。它再次显示一个文本,而不是我计划的第二个文本。

我不知道如何制作它,并且思考这个问题已经被困了 3 天。我听说过这些论坛并决定试一试。

我不知道我是否清楚,但如果没有,这个想法基本上是:

如果 - 第 1 周,星期日 (0):Tecna:需要我们网站的任何指导吗?访问论坛!它们是从像您一样的人以及从 minimod 那里获得帮助的最实用方式!此外,您发布的每条消息都会获得虚拟硬币!

if - 第 2 周,星期日 (0): Tecna:根据网络心理学,您选择并在网络上代表自己的昵称和头像可以告诉其他人很多关于您的信息。所以,请慎重选择!

如果你们能找到一种方法来完成这项工作,我将非常非常感激!我一直在浏览与此相关的不同主题,但没有人尝试在一周结束时更改文本,并在 7 天后重置。我希望它在 60 后重置。

    function Horoscopo() {
        var data = new Date();
        var dia = data.getDay()
        var mes = data.getMonth()
        var diames = data.getDate()
        
        // Weekly Tips
        if (dia == 0) {
            $("strong.tip").html("<span class='formalFont'>Why do you hear the sea in a seashell? Abandoned by the mollusks and other undersea animals,shells can be put up against your ear. The ambient noise around the shell will resonate inside the shell,creating a sound similar to crashing waves!</span>");
        }
        if (dia == 1) {
            $("strong.tip").html("<span class='formalFont'>Need any guidance with our website? Visit the forums! They're the most practical way to get help from people just like you,as well as from the minimods! Plus,you get virtual coins for each message you post!</span>");
            
        }
        if (dia == 2) {
            $("strong.tip").html("<span class='formalFont'>The forums are the best hangout spots to spend time with friends! Endless chats,tons of games,contests,stories... there's just so much fun! I don't even kNow where to begin!</span>");

        }
        if (dia == 3) {
            $("strong.tip").html("<span class='formalFont'>Put your feet in the spotlight! I have two choices for you: round toe boots from the 60s,with a low heel or wedge -- or heels wrapped in soft legwarmers!</span>");
        }
        if (dia == 4) {
            $("strong.tip").html("<span class='formalFont'>Vain Pirates? Not exactly! Pirates wore earrings because they believed piercing the ear Could improve eyesight. It also helped them be recognized after death!</span>");
        }
        if (dia == 5) {
            $("strong.tip").html("<span class='formalFont'>What's the largest city in the world? It's Tokyo,the capital of Japan with a staggering 35.7 million people! Second is New York,followed by Sao Paulo and SEOul!</span>");
        }
        if (dia == 6) {
            $("strong.tip").html("<span class='formalFont'>The plants need plenty of water this season! Whatever you do,don't water them when the sun is high in the sky,that causes the leaves to burn! The ideal time is around sunset.</span>");
        }
</script>

<body onload="Horoscopo();">
    <div style="width:200px; float:left; padding-bottom:10px;">
        <div style="padding-bottom:0px;">

            <div style="background:url(../medias/images/Horoscope/totd_stella.png); width:207px; height:auto; background-repeat:no-repeat; background-color:#78cce4;">
                <table style="border: 0px; cellpadding: 0px; cellspacing: 0px">
                    <tbody>
                        <tr>
                            <td>
                                <div class="menuBlackFont" style="text-align: left; color:#FFFFFF; padding-top: 5px; padding-left: 10px; padding-bottom: 120px;">
                                    <span>Tip of the Day</span>
                                </div>

                                <div style="background:url(../medias/images/Horoscope/speech_bubble_top.png); width:200px; height:33px;">
                                </div>

                                <div style="background:url(../medias/images/Horoscope/speech_bubble_center.png);
                                        width:200px; background-repeat:repeat-y;">

                                    <div style="padding-left:15px; padding-right:15px;">
                                        <strong class="tip"><span class="formalFont"></span></strong>
                                    </div>
                                </div>

                                <div style="background:url(../medias/images/Horoscope/speech_bubble_bottom.png); width:200px; height:25px;"></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <p></p>
        </div>


版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。