前端速查手册——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是一个非 ...
随机推荐
- 《CoderXiaoban》第八次团队作业:Alpha冲刺 3
项目 内容 这个作业属于哪个课程 任课教师博客主页链接 这个作业的要求在哪里 实验十二 团队作业8:软件测试与ALPHA冲刺 团队名称 Coderxiaoban团队 作业学习目标 (1)掌握软件测试基 ...
- test20190815 NOIP2019 模拟题
100+60+40=200,被后面两个题卡着我很不爽. 立方数 [问题描述] 作为 XX 战队的狂热粉丝,MdZzZZ 看到了自己心仪的队伍在半决赛落败,顿时 心灰意冷.看着自己手中的从黄牛那里抢来的 ...
- GITHUB添加SSH内容
首先,你需要注册一个 github账号,最好取一个有意义的名字,比如姓名全拼,昵称全拼,如果被占用,可以加上有意义的数字. 本文中假设用户名为 chuaaqiCSDN(我的博客名的全拼) 一.gihu ...
- ascii、unicode、utf-8、gbk 区别?
发展史: https://www.cnblogs.com/houxt/p/11250878.html python2内容进行编码(默认ascii),而python3对内容进行编码的默认为utf-8. ...
- uic
uic user interface complieruic mainwindow.ui >> ui_mainwidow.h
- saltstack 基础模块
Salt 在 linux 系统下 基础操作 1.更改权限 # salt 2.更改用户 # salt '172.16.3.9' file.chown /root/test test test 3.复制文 ...
- 那些被Oracle优化的程序员
甲骨文(中国)是一家很有趣的公司,势头强劲,却被公认为养老公司(俗称西二旗养老院).风光无限,却也走上了裁员之路. 据甲骨文员工透漏,前一天晚上还在加班改bug,第二天就通知被裁了,甚至要求被裁员工在 ...
- PHP的3种发送HTTP请求的方式
1.CURL方式发送数据及上传文件 <?php class IndexController extends ControllerBase { public function indexActio ...
- P3723 【[AH2017/HNOI2017]礼物】
被某大佬指出这是多项式板子!? 我们假设我们原始数列是\(a_i, c_i\), 旋转后的数列是\(a_i, b_i\),我们的增加量为x \[\sum_{i = 1}^n(a_i - b_i + x ...
- [Shell]利用JS文件反弹Shell
0x01 模拟环境 攻击: kali ip: 192.168.248.132 测试: windows 7 x64 ip: 192.168.248.136 0x02 工具地址 https://githu ...