前端速查手册——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是一个非 ...
随机推荐
- js数组的操作大全
用 js有很久了,但都没有深究过js的数组形式.偶尔用用也就是简单的string.split(char).这段时间做的一个项目,用到数组的地方很多,自以为js高手的自己居然无从下手,一下狠心,我学!呵 ...
- 使用Navicat Premium 12导出SQL语句并在Power Designer 16.5中生成物理模型
内容简介 本文主要介绍使用Navicat Premium 12导出建表SQL(使用MySQL数据库)文件,并在Power Designer 16.5中使用导出的SQL文件来生成物理模型的步骤. 操作步 ...
- IO多路复用的作用?
I/O多路复用实际上就是用select, poll, epoll监听多个io对象,当io对象有变化(有数据)的时候就通知用户进程.好处就是单个进程可以处理多个socket.当然具体区别我们后面再讨论, ...
- spring-data-jpa一对多多对一多对多关联
一对多.多对一 Country类 @Entity @Table(name = "Country") public class Country { @Id //sequence id ...
- CSP-J总结&题解
总结: 这一次,最后一次,还是不行啊. 文件操作方面:没有FCLOSE,血的教训. 考场复盘: 首先一二题没什么好讲的,秒切.但是第三题由于一开始看出来是完全背包,但是好像又不是,去年又有摆渡车阴影, ...
- 2019/7/18 --1.<%@ include file=""%>与<jsp:include page=""/>两种方式的作用
一.前言 身为一名coder有太多太多的知识点要去学,太多太多的东西要去记.往往一些小细节也就难免疏忽,但悲催的是多数困恼你的bug就是因为这些微不足道的知识点.我们又不是机器人,怎么可能什么都记得了 ...
- webuploader+Java如何实现分片+断点续传
核心原理: 该项目核心就是文件分块上传.前后端要高度配合,需要双方约定好一些数据,才能完成大文件分块,我们在项目中要重点解决的以下问题. * 如何分片: * 如何合成一个文件: * 中断了从哪个分片开 ...
- RookeyFrame 附件 上传附件
上传附件可允许的格式: 位置:Rookey.Frame.Web\Config\upload.xml 节点:Attachment -> allowType
- 1066 Root of AVL Tree (25)
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child sub ...
- goland 安装破解
链接:https://pan.baidu.com/s/1vH70CHq122RbfwLwbHewjg 密码:zilv 复制如下注册码: 56ZS5PQ1RF-eyJsaWNlbnNlSWQiOiI1 ...