前端速查手册——Note
目录
自定义弹框(模块框)
HTML
<div style="display:none" id="model"></div>
<div style="display:none" id="notice_div" class="notice_div">
<div id="notice_header">
<div id="notice_title">提示信息</div>
</div>
<div id="notice_content">
<div id="notice_msg">信息</div>
</div>
<div id="notice_action">
<button class="confirm_btn" onclick="cancel()">确认</button>
<button class="return_btn" onclick="cancel()">返回</button>
</div>
</div>
CSS
#model {
width:100%;
height:200%;
position:fixed;
left:0;
top:0;
background:black;
opacity:0.8;
}
#notice_div {
width: 40%;
height:200px;
position:fixed;
left:30%;
top: 20%;
height:30%;
text-align:center;
font-size:18px;
}
#notice_header {
height: 50px;
background-color:#1e88d4;
border-radius: 10px 10px 0 0;
color: black;
font-weight:900;
}
#notice_title {
padding-top:12px;
}
#notice_content {
height:100px;
background-color:#d3d7cf;
border-top:1px solid gray;
border-bottom:1px solid gray;
}
#notice_action {
height:50px;
background-color:#d3d7cf;
text-align:center;
border-radius: 0 0 10px 10px;
}
#notice_msg {
margin-top:30px;
color: black;
}
.confirm_btn, .return_btn {
text-align: center;
width: 100px;
height: 35px;
line-height: 35px;
margin-top:7px;
letter-spacing: 5px;
text-indent: 10px;
background: #1e88d4;
border: 1px solid #1e88d4;
border-radius: 5px;
display: inline-block;
cursor:pointer;
}
.return_btn {
background: #9ea09a;
border: 1px solid #9ea09a;
}
JavaScript
function alert_msg(content, title="提示信息") {
$("#notice_title").html(title);
$("#notice_msg").html(content);
$("#model").show();
$("#notice_div").show();
}
function cancel() {
$("#model").hide();
$("#notice_div").hide();
}
HTML新增标签
HTML5新增属性
输入框自动获得焦点
autofocus属性,可以直接写input标签中该属性即可(不用赋值)。也可以赋值为true或者“autofocus",都可以开启自动获得焦点。
<input type="text" autofocus />
<input type="text" autofocus=true />
<input type="text" autofocus="autofocus" />
自动补全
autocomplete属性,默认的是on,也就是开启了自动补全功能。可以设置为off,即可关闭自动补全。
示例:
<input type="text" autocomplete="on" />
<input type="text" autocomplete="off" />
如果想要全部禁用input的自动补全功能,可以使用jquery实现:
$("input").attr("autocomplete", "off")
前端速查手册——Note的更多相关文章
- 25个有用的和方便的 WordPress 速查手册
如果你是 WordPress 开发人员,下载一些方便的 WordPress 备忘单可以在你需要的时候快速查找.下面这个列表,我们已经列出了25个有用的和方便的 WordPress 速查手册,赶紧收藏吧 ...
- web 开发:CSS3 常用属性——速查手册!
web 开发:CSS3 常用属性——速查手册! CSS3 简介:http://www.runoob.com/css3/css3-intro.html 1.目录 http://caniuse.com/ ...
- CUDA 7.0 速查手册
Create by Jane/Santaizi 03:57:00 3/14/2016 All right reserved. 速查手册基于 CUDA 7.0 toolkit documentation ...
- 《zw版·Halcon-delphi系列原创教程》 zw版-Halcon常用函数Top100中文速查手册
<zw版·Halcon-delphi系列原创教程> zw版-Halcon常用函数Top100中文速查手册 Halcon函数库非常庞大,v11版有1900多个算子(函数). 这个Top版,对 ...
- R之data.table速查手册
R语言data.table速查手册 介绍 R中的data.table包提供了一个data.frame的高级版本,让你的程序做数据整型的运算速度大大的增加.data.table已经在金融,基因工程学等领 ...
- 25个有用和方便的 WordPress 速查手册
如果你是一个 WordPress 编码器或开发人员,下载一些方便的 WordPress 备忘单寻找你的工作然后你在正确的地方.我们已经列出了25个有用的和方便的 WordPress 速查手册.Word ...
- 几个较好的SQL速查手册网址
微软 SQL server 数据库开发手册 数据库设计 Transact-SQL 速查手册 数据库设计 MySQL 中文参考手册速查 结构化查询语言 SQL 学习手册速查 转自:http://www. ...
- Markdown速查手册
之前一直使用简书做笔记,沉浸式的写作环境很棒.然而不知什么时候起,氛围愈发浮躁,软文鸡汤泛滥,离"简"字越来越远. 相比更加喜欢沉稳低调.内涵取胜的博客园.于是乎搬家! 搬家就要丢 ...
- Pandas速查手册中文版
本文翻译自文章: Pandas Cheat Sheet - Python for Data Science ,同时添加了部分注解. 对于数据科学家,无论是数据分析还是数据挖掘来说,Pandas是一个非 ...
随机推荐
- mysql 两张表字段模糊匹配--字符串拼接函数
concat(A,B,C,...) 拼接字符串 例如concat('123','***','345') =>123***345 SELECT concat( substr(t1.CODE, ...
- nginx配置白名单
配置如下: http模块: http { include mime.types; default_type application/octet-stream; #log_format main '$r ...
- mini_frame(web框架)
文件目录: dynamic中:框架 static:css,jss静态文件 teplates:模板 web_server.conf: 配置文件 web_server.py: 主程序 run.sh:运行脚 ...
- 07 Node.js安装及环境配置
二.安装Node.js步骤 1.下载对应你系统的Node.js版本:https://nodejs.org/en/download/2.选安装目录进行安装3.环境配置4.测试 开始安装 1.下载完成后, ...
- jQuery弹出提示信息自动消失简洁版
// 在bootstrap中可以,可以使用如下方式实现弹出提示信息自动消失,如果没有使用bootstrap框架,可以自定义样式 //tip是提示信息,type:'success'是成功信息,'dang ...
- SpringBoot测试Controller层
一.准备工作 1.导入测试依赖 <dependency> <groupId>org.springframework.boot</groupId> <artif ...
- asp.net+ tinymce粘贴word
公司做的项目需要用到粘贴Word功能.就是将word内容一键粘贴到网页编辑器(在线富文本编辑器)中.Chrome+IE默认支持粘贴剪切板中的图片,但是我要粘贴的文章存在word里面,图片多达数十张,我 ...
- CF446C DZY Loves Fibonacci Numbers 线段树 + 数学
有两个性质需要知道: $1.$ 对于任意的 $f[i]=f[i-1]+f[i-2]$ 的数列,都有 $f[i]=fib[i-2]\times f[1]+fib[i-1]\times f[2]$ 其中 ...
- CF19D Points 平衡树
题意:支持插入/删除点 $(x,y)$,查询一个点右上方横坐标与之最接近的点坐标. 我们可以对于每一个操作过的横坐标都开一个 $set$,然后再开一个平衡树,维护每个横坐标上最大的纵坐标. 然后查询点 ...
- Node.js 自学之旅(初稿篇)
学习基础,JQuery 原生JS有一定基础,有自己一定技术认知(ps:原型链依然迷糊中.闭包6不起来!哎!) 当然最好有语言基础,C#,java,PHP等等.. 最初学习这个东西的原因很简单,在园子里 ...