文章标题
来源:互联网 发布:阿里云怎么打开端口 编辑:程序博客网 时间:2024/06/01 17:52
undercodeJS template模板
和之前接触的jsp页面有点儿相似
<!DOCTYPE html><html><head> <meta charset="utf-8" /> <title>Underscore</title> <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="format-detection" content="telephone=no"/> <link href="index.css" rel="stylesheet" type="text/css" /> <script src="jquery.js"></script> <script src="underscore.js"></script></head><body></body></html><!--ace-template demo--> <script id="t2" type="text/template"> <%_.each(datas, function(item) {%> <div class="outer"> <div class="title"> <span ><%=item.film%></span> </div> <ul class="ul"> <%_.each(datas, function(item) {%> <li> <a href="<%=item.url%>">【<%=item.title%>】</a> </li> <%});%> </ul> </div> <%});%> </script><!--数据 --> <script> var datas = [ { title: "一九四二", url: "http://www.baidu.com", film:"电影1" }, { title: "少年派的漂流", url: "http://www.baidu.com", film:"电影2" }, { title: "教父", url: "http://www.baidu.com", film:"电影3" }, { title: "肖申克的救赎", url: "http://www.baidu.com", film:"电影4" }, { title: "3d2012", url: "http://www.baidu.com", film:"电影5" } ]; $("body").html( _.template($("#t2").html(), datas)); </script><!--点击下拉事件--> <script type="text/javascript"> $('.ul').hide(); $('.ul>li:last-child').addClass('last-li'); $('body>div:first-child>ul').show(); $('.title').click(function(){ $(this).siblings().toggle(); $(this).parent().siblings().children('.bbs-nav-ul').hide(); }) $('.title').hover(function(){ $(this).toggleClass('hover'); }) $('.ul>li').hover(function(){ $(this).toggleClass('hover'); }) </script
阅读全文
0 0
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 项目遇到的一些问题 实现思路
- 每个人都走在自己的时区里
- pyspider 操作
- Android适配语言
- prototype属性简介
- 文章标题
- c#使用vr box 手柄开发
- 深度学习中的数学—Lecture 1(1)
- linux 输出重定向,管道,cut,grep,wc,sort
- solr三种解析器的通用参数
- RANSAC算法详解
- soj.1150 简单魔块
- 【java】Java常考面试题(学习笔记)
- tf.concat