普通网友 2017-02-20 06:39 采纳率: 0%
浏览 1525

html邮件模板如何循环变量数组

下边是原模板,这个时候数组是固定长度(3)的date,但是我现在想扫表,发每天的数据,所以得到的是一个变量数组长度i不确定date[i],如何在html模板中做循环,求大神在html上写下,谢谢

 <?xml version="1.0" encoding="UTF-8"?>
<xml-body>
    <html>
        <head>

        </head>

        <body link="blue" vlink="purple"
            style="tab-interval:21.0pt;text-justify-trim:
punctuation">

            <div style='layout-grid:21.15pt'>

                <p>
                    <span
                        style='font-family:宋体;mso-ascii-font-family:Cambria;
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:宋体;mso-fareast-theme-font:
minor-fareast;mso-hansi-font-family:Cambria;mso-hansi-theme-font:minor-latin'>亲爱的{0},您好!</span>
                </p>

                <p>
                    <span>
                        <span style='mso-tab-count:1'>

                        </span>
                    </span>
                    <span
                        style='font-family:宋体;mso-ascii-font-family:Cambria;
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:宋体;mso-fareast-theme-font:
minor-fareast;mso-hansi-font-family:Cambria;mso-hansi-theme-font:minor-latin'>您正在绑定安全邮箱,验证码:{1},请在{2}分钟内完成输入。</span>
                </p>
                <p>
                    <span>
                        <span style='mso-tab-count:1'>
                        </span>
                    </span>
                    <span
                        style='font-family:宋体;mso-ascii-font-family:Cambria;mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:宋体;mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:
Cambria;mso-hansi-theme-font:minor-latin'>为了您的信息安全,切勿将验证码透露于他人。</span>

                </p>

                <p>
                    <span>
                        <span style='mso-tab-count:1'>
                        </span>
                    </span>
                    <span
                        style='font-family:宋体;mso-ascii-font-family:Cambria;mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:宋体;mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:
Cambria;mso-hansi-theme-font:minor-latin'>注意:如非本人操作,请及时登录并修改密码以保证账户安全。</span>
                </p>


            </div>

        </body>

    </html>


</xml-body>
  • 写回答

4条回答 默认 最新

  • zwxiaoliu 2017-02-20 07:13
    关注

    什么意思,单纯的html? html只是文本文件,没有处理能力呀。 需要使用js 或者 模板语言。

    评论

报告相同问题?

悬赏问题

  • ¥15 优质github账号直接兑换rmb,感兴趣伙伴可以私信
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)