pa

1. HTML5新增的表单输入类型有哪些

number   <input type=”number” />只能输入数字

tel    <input type=”tel” />电话

range     <input type=”range” min=”20” max=”100”value=”30” step=”” />特性范围内数值选择器,其中step是指每移动一次的步数

email  <input type=”email” />邮箱,验证规则:只识别英文和@。

url    <input type=”url” />会在提交时对url字段集进行验证,只识别全程http://baidu.com

search  <input type=”search” />搜索框

color     <input type=”color” />拾色器

date   <input type=”date/month/week” /> 年月 日  /  年月 /  年 周
time    <input type=”time” />时间,时与分
datetime-local     <input type=”datetime-local” />当地时间,年月 日 时 分 秒

扫描二维码关注公众号,回复: 6839788 查看本文章

2.HTML 本地存储分别有哪几种方式

cookies

localstorage   sessionstorage   (getItem //取记录    setIten//设置记录     removeItem//移除记录)

application cache 

IndexedDB

3.JS的基本数据类型有哪些

Number,,Boolean,String Undefined,Null  symbol ( symbol 不可强制转换 )

4. CSS实现隔行换色代码 

div:nth-of-type(odd){ background:#00ccff;}
div:nth-of-type(even){ background:#ffcc00;}

/

div:nth-child(2n){
background-color: red;
}
div:nth-child(2n+1){
background-color: yellow;
}

5. DOM事件流的模型包括哪几种?

捕获和冒泡(ie用的是事件冒泡)

6. 流行的构建工具有哪几种

Grunt   Gulp  Browserify   Webpack

7.实现浏览器多个标签页的通信有哪几种方式

localstorge、cookies

8.substr和substring

substr(startIndex,lenth)   startIndex  支持负数

substring(startIndex, endIndex)   startIndex  不支持负数(视为0   ,  str.substring(0))

9.写一个正则表达式允许所有数字、小数点、下划线

/[0-9\.\_]/g.test(2)

猜你喜欢

转载自www.cnblogs.com/justSmile2/p/11227721.html
pa
今日推荐