摘要: 1、H5页面(APP端) 1.1 APP端页面用HTML5制作,头部需要加适配信息: <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="viewport" content="initial 阅读全文
posted @ 2017-08-11 11:17 HelenJ 阅读(724) 评论(0) 推荐(1) 编辑
摘要: 一、select遇到的坑 1、select赋默认值--多选和单选 1.1 单选:$('#id').val( value ); //这里是字符串 1.2 多选:$('#id').val( array ); //这里必须将多个值组成的字符串(或者其他非数组)转化成数组 1.2.1 字符串转数组:str. 阅读全文
posted @ 2017-08-11 11:10 HelenJ 阅读(577) 评论(0) 推荐(0) 编辑
摘要: 第一章 一、内联块 display: inline-block; 1、特征: 1.1 块级元素在一行显示 (得到内联元素的属性) 1.2 内联元素支持宽高 (得到块的属性) 1.3 没有宽度的时候,内容撑开宽度 (得到内联元素的属性) 1.4 标签之间的换行间隙被解析(问题) (得到内联元素的属性) 阅读全文
posted @ 2017-08-11 11:07 HelenJ 阅读(869) 评论(0) 推荐(0) 编辑
摘要: 第一章 一、样式 1、行间样式,代码不可维护,不推荐 2、内联样式,不可重用,不推荐 3、外联样式,可重用,可维护,推荐 <link rel="stylesheet" href="...css" /> 二、边框 1、组成:border: 1px [ solid | dashed |double ] 阅读全文
posted @ 2017-08-11 11:06 HelenJ 阅读(971) 评论(0) 推荐(0) 编辑
摘要: 一、JavaScript原生事件代理 var item = document.getElementById('item'); item.onclick(function(ev) { var ev = ev || window.event; var target = ev.target || ev.s 阅读全文
posted @ 2017-08-11 10:57 HelenJ 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、时间 var date = new Date(); Demos: https://github.com/jiangheyan/JavaScriptBase 1、getFullYear(); 2 阅读全文
posted @ 2017-08-11 10:56 HelenJ 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、定时器管理 Demos: https://github.com/jiangheyan/JavaScriptBase 1、var timer = null; 改为 oDiv.timer = nu 阅读全文
posted @ 2017-08-11 10:55 HelenJ 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、return Demos: https://github.com/jiangheyan/JavaScriptBase 1、返回值:数字、字符串、布尔、函数、对象({}、[]、元素、null)、 阅读全文
posted @ 2017-08-11 10:54 HelenJ 阅读(592) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 运算符 Demos: https://github.com/jiangheyan/JavaScriptBase 一、模% i % num > 0、1、2……num-1(i比num小取i值,i比nu 阅读全文
posted @ 2017-08-11 10:51 HelenJ 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、函数传参 Demos: https://github.com/jiangheyan/JavaScriptBase 1、参数=js数据类型 数字、字符串、对象、函数、布尔、未定义 二、代码重用 阅读全文
posted @ 2017-08-11 10:48 HelenJ 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、浏览器 Demos: https://github.com/jiangheyan/JavaScriptBase 1、“JS解析器”(至少分为两步骤) 1.1 JS预解析(代码正式运行之前的准备 阅读全文
posted @ 2017-08-11 10:48 HelenJ 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、ECMAScript:标准、核心,规定js中的语法、数据类型 (eg. HTML标签类型:block、inline、inline-block、table……) Demos: https://g 阅读全文
posted @ 2017-08-11 10:42 HelenJ 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、自定义属性 Demos: https://github.com/jiangheyan/JavaScriptBase 1、读写操作 <input abc="123" type="button" 阅读全文
posted @ 2017-08-11 10:41 HelenJ 阅读(335) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、自动生成100个Li思路: Demos: https://github.com/jiangheyan/JavaScriptBase 1、html布局,在button中做点击事件 2、获取将要放 阅读全文
posted @ 2017-08-11 10:27 HelenJ 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、利用纯js编写,兼容IE9以及IE9以上 Demos: https://github.com/jiangheyan/JavaScriptBase 1、两张图片重合排放,并且背面的图片displ 阅读全文
posted @ 2017-08-11 10:26 HelenJ 阅读(242) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、思路 Demos: https://github.com/jiangheyan/JavaScriptBase 1、模拟手机聊天思路: a.静态页面html+css,包括双发短信发送成功后的基本 阅读全文
posted @ 2017-08-11 10:25 HelenJ 阅读(260) 评论(0) 推荐(0) 编辑
摘要: Demos: https://github.com/jiangheyan/JavaScriptBase 一、js大致思路: 1、完成静态HTML+CSS 2、过一遍整体的大致js思路 3、按照从上到下的,从有至无的顺序完成js编写(包括先写大致轮廓,再细化细节部分) 4、调试代码 二、要点: 1、h 阅读全文
posted @ 2017-08-11 10:23 HelenJ 阅读(196) 评论(0) 推荐(0) 编辑