Mailjet模板语言中IF条件的使用

时间:2019-01-03 15:23:13

标签: templates mailing mailjet

我现在正在将一封旧电子邮件改编成MTML,但有一个问题,我找不到解决方法。

我想知道是否有办法将<form id="myForm" action="/" method="post"> <label id="authlabel">User Authentication method:</label> <br> <select id="authMethod" name="authmethod"> <option disabled selected value> -- select an option -- </option> <option value="userName">Name</option> <option value="userId">User ID</option> </select> <br> <input type="submit" value="submit"></input> </form> 放在const myForm = document.querySelector('#myForm'); document.querySelector('#authmethod').addEventListener('change', function(event){ let authInput = document.createElement('input'); authInput.name = event.target.value; myForm.insertBefore(authInput, event.target.nextSibling); }); 标签内。

我有这段代码,我想在每个选择之间做一个假设:

{% if... %}

0 个答案:

没有答案