摘要: Examples 选项1 选项2 阅读全文
posted @ 2017-12-04 17:59 Hakuna__Matata 阅读(5089) 评论(0) 推荐(0) 编辑
摘要: $(function(){ $(".item_list").each(function(){ var radio_this=$(this).children('ul').children('li').children('span'); radio_this.find('input').click(f 阅读全文
posted @ 2017-12-04 11:48 Hakuna__Matata 阅读(1998) 评论(0) 推荐(0) 编辑
摘要: 在jquery中可以使用2种方法来判断一个元素是否包含一个确定的类(class)。两种方法有着相同的功能。2种方法如下: 1. is(‘.classname’) 2. hasClass(‘classname’) 以下是一个div元素是否包含一个redColor的例子: 1. 使用is(‘.class 阅读全文
posted @ 2017-12-04 10:39 Hakuna__Matata 阅读(2183) 评论(0) 推荐(0) 编辑
摘要: <style>.distribCol1{text-align:justify; text-justify:distribute-all-lines; text-align-last:justify; text-indent:10px; width:140px}</style><div class=" 阅读全文
posted @ 2017-12-04 10:19 Hakuna__Matata 阅读(2924) 评论(0) 推荐(0) 编辑
摘要: 1. word-break:break-all;只对英文起作用,以字母作为换行依据 2. word-wrap:break-word; 只对英文起作用,以单词作为换行依据 3. white-space:pre-wrap; 只对中文起作用,强制换行 4. white-space:nowrap; 强制不换 阅读全文
posted @ 2017-11-07 18:05 Hakuna__Matata 阅读(726) 评论(0) 推荐(0) 编辑
摘要: 在input框中有时想将输入的字和placeholder设为不同的颜色或其它效果,这时就可以用以下代码来对placeholder进行样式设置了。 ::-webkit-input-placeholder{} /* 使用webkit内核的浏览器 */ ::-webkit-input-placeholde 阅读全文
posted @ 2017-11-07 11:52 Hakuna__Matata 阅读(307) 评论(0) 推荐(0) 编辑
摘要: //时间戳转换成日期时间2014-8-8 下午11:40:20function formatDate(ns){ return new Date(parseInt(ns) * 1000).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " "); 阅读全文
posted @ 2017-06-08 15:51 Hakuna__Matata 阅读(235) 评论(0) 推荐(0) 编辑
摘要: //获取当前时间: var myDate = new Date();//当前时间 var year = myDate.getFullYear();//当前年份 var month = myDate.getMonth() + 1;//当前月份 var day = myDate.getDate();// 阅读全文
posted @ 2017-06-07 16:58 Hakuna__Matata 阅读(2461) 评论(0) 推荐(0) 编辑
摘要: 1.数组的声明方法 (1): arrayObj = new Array(); //创建一个数组。 代码:var arr1 = new Array(); (2):arrayObj = new Array([size]) 创建一个数组并指定长度,注意不是上限,是长度。 代码:var a = new Ar 阅读全文
posted @ 2017-06-07 15:55 Hakuna__Matata 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 首先,我们看个事例: for(i=0;i<10;i++) { if ( (p+i) == q ) console.writeLine("查找到字符{0},在数组的第{1}个位置/n",q,i); else if console.writeLine("不相同"); } 这个事例为什么对的和错的都能输出 阅读全文
posted @ 2017-06-07 14:38 Hakuna__Matata 阅读(3047) 评论(0) 推荐(0) 编辑