01 2020 档案

摘要:效果: 代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta ht 阅读全文
posted @ 2020-01-14 17:56 执手听风吟 阅读(560) 评论(0) 推荐(0) 编辑
摘要:Ajax做文件上传就会有兼容性的问题。只有一些高版本的浏览器可以实现文件上传的功能。Ie6 ie7 低版本浏览器不能实现。因为ajax文件上传用到Formdata,它是h5新增的,有兼容问题,低版本浏览器不支持。 数据往formdata中加: 调用formdata的append方法,用原生dom对象 阅读全文
posted @ 2020-01-14 17:46 执手听风吟 阅读(2185) 评论(0) 推荐(0) 编辑
摘要:效果: 代码: <style> .inputBox { width: 100px; height: 50px; background: green; color: white; font-size: 16px; text-align: center; line-height: 50px; borde 阅读全文
posted @ 2020-01-11 10:13 执手听风吟 阅读(2816) 评论(0) 推荐(0) 编辑
摘要:去重数据: var arr = [{ key: '01', value: '西施' }, { key: '02', value: '王昭君' }, { key: '03', value: '杨玉环' }, { key: '04', value: '貂蝉' }, { key: '01', value: 阅读全文
posted @ 2020-01-10 14:28 执手听风吟 阅读(17294) 评论(1) 推荐(1) 编辑
摘要:本文将分享 DOM 节点树深度遍历、广度遍历代码。 假定我仅遍历 body 且其结构如下: <body> <section class="container"> <div class="left"> <div class="menu"></div> </div> <div class="right" 阅读全文
posted @ 2020-01-04 11:28 执手听风吟 阅读(7472) 评论(0) 推荐(2) 编辑