2 Star 9 Fork 5

yoby / jqueryplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
demo.html 1.82 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
yoby 提交于 2017-12-20 01:01 . 更新
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>演示js</title>
<script src="jquery.min.js"></script>
<link rel="stylesheet" href="http://127.0.0.1/weixin/addons/ewei_shopv2/static/css/bootstrap.min.css?v=3.3.6">
<script src="http://127.0.0.1/weixin/web/resource/js/lib/bootstrap.min.js"></script>
<script src="tpl.js"></script>
<style>
.msgbox {
position:fixed;
margin:auto;
height:32px;
line-height:32px;
width:100%;
text-align:center;
z-index:99999;
-moz-transition-duration: 300ms;
-webkit-transition-duration: 300ms;
transition-duration: 300ms;
top:-32px;
opacity:0;
}
.msgbox.in {
top:-1px;
opacity: 1;
}
.msgbox .msg {
display:inline-block;
white-space:nowrap;
height:32px;
line-height:30px;
color:#fff;
font-size:14px;
min-width: 550px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
.msgbox .msg.msg-success {
background:#54c952
}
.msgbox .msg.msg-warning {
background:#ffc000
}
.msgbox .msg.msg-error {
background:#eb6060
}
.msgbox.loading {
top:10px;
opacity:1;
}
.msgbox.loading .msg {
min-width: 150px;
background:#f8f8f8;
border:1px solid #f2f2f2;
border-radius:3px;
color:#666;
}
.msgbox.loading i {
color:#09c;
}
</style>
</head>
<body>
<div id="content"></div>
<script id="test" type="text/html">
<% for (var i=0;i<list.length;i++) { %>
<div><%=i%>. <%=list[i]%>
</div>
<%}%>
<br>
<%=title%><br>
<% for(var j in list){%>
<%=list[j]%>--
<%}%>
</script>
<script>
var data = {
title: '我是标题',
list: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他']
};
var html = tpl($('#test').html(), data);
$('#content').html(html);
</script>
<script>
</script>
</body>
</html>
JavaScript
1
https://gitee.com/yoby/jqueryplus.git
git@gitee.com:yoby/jqueryplus.git
yoby
jqueryplus
jqueryplus
master

搜索帮助

14c37bed 8189591 565d56ea 8189591