js_template:js_template 的实现原理

时间:2021-05-10 21:45:51
【文件属性】:
文件名称:js_template:js_template 的实现原理
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-10 21:45:51
JavaScript js_template js_template 的实现原理 1.正则抠出要匹配的内容 2.装入数组 3.分辨js逻辑部分 4.引擎函数 5.把data扔进去 主要是正则替换 //1 // out template <% for (var i = 0; i <%user.name%> <% }else { %> <%user.name%> <% } }%> // 2 //
【文件预览】:
js_template-master
----test.html(1KB)
----README.md(1KB)
----js_template.js(3KB)
----xiaohuzi()
--------js_template.js(3KB)
--------js_template.html(594B)
--------test1.html(3KB)

网友评论