Jquery load()方法 实现公用头部 尾部
来源:互联网 发布:上海爱回收java 编辑:程序博客网 时间:2024/05/21 10:31
//这是header.html里的代码,想作为头部引进来
<div id="loginBox"> <span></span> <div> <div> <img src="common/images/login.jpg" alt="login"/> </div> <div> </div> <div> <label for=""> <span>姓名:</span> <input id="username" type="text" placeholder="input your name"/> </label> </div> <div> <label for=""> <span>密码:</span> <input id="password" type="password" placeholder="input your password"/> </label> </div> <div> <b> <button type="submit" id="loginsub" class="btn btn-success" >登陆</button> <button type="reset" id="loginset" class="btn btn-danger">重置</button> </b> </div> </div></div>
在header.js里边这样写
$("#header").load('common/html/header.html', function (data, status, xhr) {})
在在想要引用的文件中找到想引用的部分即可
<html lang="en"><head> <meta charset="UTF-8"> <link rel="stylesheet" href="../common/css/header.css"/> <link rel="stylesheet" href="../common/css/footer.css"/> <link rel="stylesheet" href="../tool/bootstrap/dist/css/bootstrap.css"/> <link rel="stylesheet" href="css/management.css"/> <title>Hisense</title></head><body><div id="header"></div>
0 0
- Jquery load()方法 实现公用头部 尾部
- 网站中公用头部与尾部?
- jQuery分块加载 头部 尾部等
- 实战RecyclerView头部尾部添加方法
- dedecms 插件plus文件调用头部尾部的方法
- Js jquery 一些公用方法
- java实现从头部及尾部删除指定长度字符
- 网页头部+尾部
- RecyclerView添加头部尾部
- Android公用头部BaseHeadActivity
- jquery的load方法----$().load
- jquery struts 验证唯一标识 公用方法
- jquery 声明公用函数 prototype方法
- jquery checkbox选择框公用方法
- JQuery 的load()方法
- jQuery Ajax load()方法
- jQuery的 Load 方法
- jquery load方法使用
- hdu 5374 Tetris 模拟俄罗斯方块
- 最常用的排序——快速排序
- POJ_1789(Truck History )(最小生成树(普里姆prim算法))
- Android-html源代码的获取
- 君と彼女の恋
- Jquery load()方法 实现公用头部 尾部
- 深入理解Java内存模型(四)——volatile
- 多线程一 CreateThread与_beginthreadex的本质区别
- OpenGL ES 绘制圆环
- UVa 10651 Pebble Solitaire(状态压缩DP)
- 轮舞前夕
- JSP学习笔记(五):web.xml中的url-pattern的映射规则
- 获取历史和实时股票数据接口
- UVA 10006 Carmichael Numbers(快速幂)