JavaScript 模版引擎 JsHtml

码农软件 · 软件分类 · 模板引擎 · 2019-08-23 21:13:12

软件介绍

JsHtml 提供简洁的 HTML、全 JavaScript 的模版引擎,灵感来自 ASP.NET MVC 中的 razor 视图引擎。可在浏览器使用,也支持 Node.js 。

示例模版 index.jshtml:

<html>
<head>
    <title>@locals.title</title>
</head>

<body>

<ul class="Task">
    @locals.taskList.forEach(function(task, index) {
        <li class="@(index % 2 ? "Odd" : "Even")">
            @tag('a', {href: '/task/' + task.id}, task.name)
        </li>
    });
</ul>

<ul class="Task">
    @for(var taskIndex = 0, taskCount = locals.taskList.length; taskIndex < taskCount; taskIndex ++){
        writePartial('task', {taskIndex: taskIndex, task: locals.taskList[taskIndex]});
    }
</ul>

<p>
if you like it, let me know!<br />
- <a target="_blank"  rel="nofollow" href="mailto:elmerbulthuis@gmail.com">elmerbulthuis@gmail.com</a><br />
</p>

</body>
</html>

本文地址:https://www.codercto.com/soft/d/13025.html

TED Talks Storytelling: 23 Storytelling Techniques from the Best

TED Talks Storytelling: 23 Storytelling Techniques from the Best

Akash Karia / CreateSpace Independent Publishing Platform / 2015-1-11 / USD 6.99

"Every speaker can put these ideas into practice immediately -- and they should!" ~ Dr. Richard C. Harris, Certified World Class Speaking Coach "An insightful read" ~Dennis Waller, Top 500 Revie......一起来看看 《TED Talks Storytelling: 23 Storytelling Techniques from the Best》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换