前端
WAE86
这个作者很懒,什么都没留下…
展开
-
常见行内元素和块级元素
常见行内元素和块级元素:1,行内元素:a,span,strong,b,em,i,label,(img,textarea,button,imput,select)行块级元素,可设置宽高,不换行。2,块级元素:div,p,pre,h1~h6,ul-li,ol-li,dl-dt-dd,form,body,table,menu.其中strong/b:字体加粗,strong是逻辑元素,有强调意义原创 2017-09-23 10:00:51 · 3123 阅读 · 0 评论 -
js数组去重
为 Array 对象添加一个去除重复项的方法示例1输入[false, true, undefined, null, NaN, 0, 1, {}, {}, 'a', 'a', NaN]输出[false, true, undefined, null, NaN, 0, 1, {}, {}, 'a']Array.prototype.uniq = fu原创 2017-09-23 11:11:57 · 253 阅读 · 0 评论 -
js中常用函数
1、截取字符串函数substring(start,end)-- 以索引start开始,end结束,若没有end参数,则从start到最后;substr(start,length) -- 以索引start开始,往后截取长度为length的字符串,若没有length参数,截取start之后的全部。slice(start,end)-- 当参数为正时,用法和substring一样。当参数为原创 2017-09-23 10:30:06 · 245 阅读 · 0 评论