正则
字符串替换
使用replace(regex,‘’)
括号里写以什么分割

字符串以叠词切割
运用正则分组()

字符串替换
同样使用replace

提取手机号

表单验证
表单证明其实就是用正则的方法将一些不服要求的输入进行验证,然后以进行限制
蹦迪存储
本地存储分为cookie,以及新增的localStorage和sessionStorage
1、cookie 存储在本地,容量最大4k,在同源的http请求时携带传递,损耗带宽,可设置访问路径,只有此路径及此路径的子路径才能访问此cookie,在设置的过期时间之前有效。
2、localStorage 存储在本地,容量为5M或者更大,不会在请求时候携带传递,在所有同源窗口中共享,数据一直有效,除非人为删除,可作为长期数据。
3、sessionStorage 存储在本地,容量为5M或者更大,不会在请求时候携带传递,在同源的当前窗口关闭前有效。
localStorage 和 sessionStorage 合称为Web Storage , Web Storage支持事件通知机制,可以将数据更新的通知监听者,Web Storage的api接口使用更方便。
另外iPhone的无痕浏览不支持Web Storage,只能用cookie。

有的网站的弹出界面就利用了coolkie的特性,只弹出一次,


jqueryUI
jQuery UI是以 jQuery 为基础的代码库。包含底层用户交互、动画、特效和可更换主题的可视控件。我们可以直接用它来构建具有很好交互性的web应用程序。
常用jqueryUI插件:
Draggable
1、设置数值的滑动条
2、自定义滚动条

滑动条和自定义滑动条
滑动条和自定义滑动条其实都是利用了jQuery-ui的便利,只不过滑动条的数据是自己计算的,然而自定义滑动条是通过动态计算出来的。


网友评论