代码拉取完成,页面将自动刷新
同步操作将从 bkssl/Jazor 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="resources/utils.js" charset="utf-8"></script>
<script type="text/javascript" src="src/pithy.teemplate.js" charset="utf-8"></script>
<script type="text/javascript" src="src/pithy.teemplate.helper.js" charset="utf-8"></script>
<title>Pithy.js.teemplate / Demo</title>
<style type="text/css">
.container {width:100%; display: flex;}
.container>div{flex:1; padding-right:20px}
.container .result>textarea{width:100%;height:600px; padding:5px;outline:none;resize:none;font-family:'微软雅黑', arial;}
</style>
</head>
<body>
<h2>Pjt示例</h2>
<div class="container">
<div class="result render-result"><h3>渲染结果</h3><div id="result"></div></div>
</div>
<script>
var data = {
name : 'anlige',
age : 23,
list : [
{date : '1986-9-1', text : 'birthday'},
{date : '1998-9-1', text : 'schrool'},
{date : '2009-6-21', text : 'work'}
],
basic : {
sex : 'boy',
works : 9
}
};
function __initlize(){
PjtHelper.bind(data, '_template', 'result');
}
on(window, 'load', __initlize);
</script>
<script type="text/template" id="_template">
<div>name = @name</div>
<div>age = @age</div>
<div>4 years later = @(age + 4)</div>
<div>sex = @basic.sex</div>
<div>works = @basic.works</div>
@{
var r = 255, g = 0, b = 0;
}
<div style="color:rgb(@r, @g, @b)">color:rgb(@r, @g, @b)</div>
<ul>
@for(var i = 0; i < list.length; i++){
<li>@list[i].text = @list[i].date</li>
}
</ul>
<ul>
@each list as value{
<li>@value.text = @value.date</li>
}
</ul>
<ul>
@foreach basic as key, value{
<li>@key = @value</li>
}
</ul>
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。