目录


自定义弹框(模块框)

HTML5新增标签

HTML5新增属性


自定义弹框(模块框)

  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的更多相关文章

  1. 25个有用的和方便的 WordPress 速查手册

    如果你是 WordPress 开发人员,下载一些方便的 WordPress 备忘单可以在你需要的时候快速查找.下面这个列表,我们已经列出了25个有用的和方便的 WordPress 速查手册,赶紧收藏吧 ...

  2. web 开发:CSS3 常用属性——速查手册!

    web 开发:CSS3 常用属性——速查手册! CSS3 简介:http://www.runoob.com/css3/css3-intro.html 1.目录 http://caniuse.com/ ...

  3. CUDA 7.0 速查手册

    Create by Jane/Santaizi 03:57:00 3/14/2016 All right reserved. 速查手册基于 CUDA 7.0 toolkit documentation ...

  4. 《zw版·Halcon-delphi系列原创教程》 zw版-Halcon常用函数Top100中文速查手册

    <zw版·Halcon-delphi系列原创教程> zw版-Halcon常用函数Top100中文速查手册 Halcon函数库非常庞大,v11版有1900多个算子(函数). 这个Top版,对 ...

  5. R之data.table速查手册

    R语言data.table速查手册 介绍 R中的data.table包提供了一个data.frame的高级版本,让你的程序做数据整型的运算速度大大的增加.data.table已经在金融,基因工程学等领 ...

  6. 25个有用和方便的 WordPress 速查手册

    如果你是一个 WordPress 编码器或开发人员,下载一些方便的 WordPress 备忘单寻找你的工作然后你在正确的地方.我们已经列出了25个有用的和方便的 WordPress 速查手册.Word ...

  7. 几个较好的SQL速查手册网址

    微软 SQL server 数据库开发手册 数据库设计 Transact-SQL 速查手册 数据库设计 MySQL 中文参考手册速查 结构化查询语言 SQL 学习手册速查 转自:http://www. ...

  8. Markdown速查手册

    之前一直使用简书做笔记,沉浸式的写作环境很棒.然而不知什么时候起,氛围愈发浮躁,软文鸡汤泛滥,离"简"字越来越远. 相比更加喜欢沉稳低调.内涵取胜的博客园.于是乎搬家! 搬家就要丢 ...

  9. Pandas速查手册中文版

    本文翻译自文章: Pandas Cheat Sheet - Python for Data Science ,同时添加了部分注解. 对于数据科学家,无论是数据分析还是数据挖掘来说,Pandas是一个非 ...

随机推荐

  1. dns-prefetch应用好,网上速度能提高一半!

    今天一个朋友给我说在网页上添加dns-prefetch,网页访问速度能提高,于是我百度查询关于dns-prefetch. DNS Prefetch,即DNS预获取,是前端优化的一部分.一般来说,在前端 ...

  2. spring框架面試題目

    25个经典的Spring面试问答 这是在网上下载的面试题,忘记了出处,如带来不便联系本人立马删除,在这里提供给将要面试的朋友,与大家分享,希望能给您带来帮助! 问题清单: 1. 什么是Spring框架 ...

  3. 题解 UVa10943

    题目大意 多组数据,每组数据给定两个整数 \(n,k\),求出用 \(k\) 个不超过 \(n\) 的数相加得到 \(n\) 的方案数(不同顺序不算同种). 分析 计数水题.令 \(f_{i,j}\) ...

  4. CodeForces - 55D - Beautiful numbers(数位DP,离散化)

    链接: https://vjudge.net/problem/CodeForces-55D 题意: Volodya is an odd boy and his taste is strange as ...

  5. 使用unsafe改善性能

    这种方式是Go所推荐的,优点就是安全,尽管这种操作会发生内存拷贝,导致性能上会有所损耗,这在处理一般业务时这种损耗是可以忽略的.但如果是拷贝频繁的情况下,想要进行性能优化时,就需要引入unsafe.P ...

  6. js中检测类型问题

    <script>    // var str = '少壮不努力,老大徒伤悲';    // console.log(str instanceof String);    // consol ...

  7. PDB符号文件浏览工具介绍

    一.SymView SymView工具用来显示符号文件中包含的符号表和符号数据.目前支持微软的Visual C/C++和C#编译器产生的DBG格式的符号文件和PDB格式的符号文件. SymView提供 ...

  8. codevs:1792分解质因数:编写一个把整数N分解为质因数乘积的程序。

    #include<iostream>#include<cstdio>using namespace std;int main(){ int i=2,n; scanf(" ...

  9. Neither shaken nor stirred(DFS理解+vector存图)

    题目链接:http://acm.timus.ru/problem.aspx?space=1&num=2013 题目理解: 给定n个点的有向图: 下面n行,第一个数字表示点权,后面一个数字m表示 ...

  10. [java][JEECG] Maven settings.xml JEECG项目初始化 RouYi settings.xml配置

    好吧一下是经验之谈,原本这些坑不应该躺的,从头看手册完全可以避免这些. 懒得整理了,看懂了就看,看不懂自己琢磨JEECG的帮助文档去,不过嘛我喜欢用Intelij IDEA,他里面都是别的IDE,不喜 ...