利用jQuery实现加载公共头部和底部
来源:互联网 发布:淘宝账号解封成功案例 编辑:程序博客网 时间:2024/06/09 14:38
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>把头部和尾部通过jquery加载进页面</title>
<link rel="shortcut icon" href="../favicon.ico" />
<style>
body{text-align: center;}
</style>
</head>
<body>
<!--放一个id为header的div,把header.html加载到这块-->
<div id="header"></div>
<div class="main" style="width:100%;padding:100px 0;background:#dcdcdc;">
<h1>我是主体</h1>
</div>
<!--放一个id为footer的div,把footer.html加载到这块-->
<div id="footer"></div>
<!--利用jquery的load()方法把header.html和footer.html加载进来 -->
<script type="text/javascript" src="../js/jquery-1.11.0.min.js" ></script>
<script>
$(function() {
$('#header').load('common/header.html');
$('#footer').load('common/footer.html');
})
</script>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>把头部和尾部通过jquery加载进页面</title>
<link rel="shortcut icon" href="../favicon.ico" />
<style>
body{text-align: center;}
</style>
</head>
<body>
<!--放一个id为header的div,把header.html加载到这块-->
<div id="header"></div>
<div class="main" style="width:100%;padding:100px 0;background:#dcdcdc;">
<h1>我是主体</h1>
</div>
<!--放一个id为footer的div,把footer.html加载到这块-->
<div id="footer"></div>
<!--利用jquery的load()方法把header.html和footer.html加载进来 -->
<script type="text/javascript" src="../js/jquery-1.11.0.min.js" ></script>
<script>
$(function() {
$('#header').load('common/header.html');
$('#footer').load('common/footer.html');
})
</script>
</body>
</html>
阅读全文
0 0
- 利用jQuery实现加载公共头部和底部
- html 引入公共的头部和底部
- ReCyclerView添加头部和底部加载
- html 如何引入一个公共的头部和底部
- RecyclerView实现添加头部和底部
- Jquery Mobile 页面头部底部分离实现共用头部底部文件
- html头部底部如何加载
- 头部底部分离实现共用头部底部文件
- RecyclerView添加头部和底部
- RecycleView添加头部和底部
- 返回头部和返回底部
- ionicCSS01_头部、底部和按钮
- SwipeMenuRecyclerView添加头部和底部
- RecyclerView添加头部和底部
- html 如何引入一个公共的头部和底部(不使用模版引擎如jsp、freemarker、velocity的方式)
- 利用JQuery实现从底部回到顶部的功能
- 利用JQuery实现从底部回到顶部的功能
- jQuery实现当拉动滚动条到底部加载数据
- python日志组件logging模块(二)
- RecyclerView与自定义Adapter
- LiteOS之内存管理
- 第八周Maximum Subarray
- Android项目快速开发集成框架
- 利用jQuery实现加载公共头部和底部
- 存储过程和函数
- Android插件化开发之Hook StartActivity方法
- Spring-mybatis整合配置错误,显示不能创建spring配置文件中的sqlSessionFactory的Bean
- String存放在堆中还是栈中
- PyQt(一)
- Activiti数据库表结构(表详细版) 转载
- c语言单链表的基本操作
- 两个mysql排锁实例