随笔分类 -  JavaScript

摘要:$(document).ready(function () { $(".example1").on("click", function (event) { var width = $(".swiper-slide").width(); var height = $(".swiper-slide"). 阅读全文
posted @ 2022-03-07 14:24 朝闲 阅读(175) 评论(0) 推荐(0)
摘要:location.href ie浏览器不跳转 阅读全文
posted @ 2019-09-26 17:40 朝闲 阅读(595) 评论(0) 推荐(0)
摘要:一、js只允许输入数字和两位小数 二、判断数组是否存在某个值 阅读全文
posted @ 2017-11-17 16:14 朝闲 阅读(1473) 评论(0) 推荐(0)
摘要:由于 c# 通过ajax获取的时间 传到前台 格式为:/Date(1354116249000)/ 所以需要转换一下,想要什么格式 更改 format() 里的 返回语句 就可以了 阅读全文
posted @ 2016-08-14 17:03 朝闲 阅读(3962) 评论(0) 推荐(0)
摘要:1、设置 Cookie 2、获取 Cookie 3、删除 Cookie 阅读全文
posted @ 2016-06-23 19:06 朝闲 阅读(141) 评论(0) 推荐(0)
摘要:$(document).ready(function () { odd = { "background": "none" }; //奇数样式 even = { "background": "#f3f3f3" }; //偶数样式 odd_even(".gys_xq", odd, even); }); 阅读全文
posted @ 2016-03-01 10:49 朝闲 阅读(904) 评论(0) 推荐(0)
摘要:跳出 iframe 在当前页跳转, window.parent.frames.location.href=www.baidu.com" 跳转页面 阅读全文
posted @ 2015-08-13 14:23 朝闲 阅读(330) 评论(0) 推荐(0)
摘要:手机号:① /^1(3[0-9]{9}|5[0-35-9][0-9]{8}|7[07][0-9]{8}|8[25-9][0-9]{8})$/ ② /^1(3\d|5[0-35-9]|7[07]|8[25-9])\d{8}$/ ②是①的简写 身份证_18: 身份证_15: var isIDCard1 阅读全文
posted @ 2015-03-31 15:36 朝闲 阅读(324) 评论(0) 推荐(0)
摘要:public void aa() { int[] a = { 1, 2, 3, 4, 5, 4, 3, 2, 1 }; Hashtable ht = new Hashtable(); for (int i = 0; i < a.Length; i++) { if (ht.ContainsKey(a[i])) { ht.Add(a[i], (int)ht... 阅读全文
posted @ 2014-12-10 17:06 朝闲 阅读(189) 评论(0) 推荐(0)