上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: var card = 'aaaaa周一女sdasd232q342';var reg = new RegExp('[\u4e00-\u9fa5]+$','g');card=card.match(/[\u4e00-\u9fa5]/g).join("");console.log(card);——————— 阅读全文
posted @ 2020-04-27 14:42 星空飘渺 阅读(3284) 评论(0) 推荐(0) 编辑
摘要: /** *扩展ie中不兼容的startsWith,endsWith方法 */String.prototype.startsWith = String.prototype.startsWith || function (str) { var reg = new RegExp("^" + str); r 阅读全文
posted @ 2020-04-27 14:38 星空飘渺 阅读(1728) 评论(0) 推荐(0) 编辑
摘要: function GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.indexOf("?") != -1) { var str = url.substr( 阅读全文
posted @ 2020-04-27 14:00 星空飘渺 阅读(891) 评论(0) 推荐(0) 编辑
摘要: 单行的: white-space:nowrap; overflow:hidden; text-overflow:ellipsis; 多行的: word-break: break-all; text-overflow: ellipsis; overflow: hidden; display: -web 阅读全文
posted @ 2020-04-27 13:58 星空飘渺 阅读(53612) 评论(0) 推荐(0) 编辑
摘要: var numberArr =[221,224,226,223,228,230,289];numberArr.filter(function (item,index) { if(item>229){ console.log(index); //找出所有大于229的元素 console.log(ind 阅读全文
posted @ 2020-04-27 13:46 星空飘渺 阅读(9137) 评论(0) 推荐(0) 编辑
摘要: /*绑定键盘回车事件*/$("body").keydown(function () { //谷歌能识别event,火狐识别不了,所以增加了这一句,chrome浏览器可以直接支持event.keyCode var theEvent = window.event || arguments.callee. 阅读全文
posted @ 2020-04-27 13:44 星空飘渺 阅读(288) 评论(0) 推荐(0) 编辑
摘要: //点击回车键时,判断姓名input框是否获得焦点,若聚焦,return。$(window).keydown( function(e) { var key = window.event?e.keyCode:e.which; if(key == 13){ var myInput = document. 阅读全文
posted @ 2020-04-14 14:20 星空飘渺 阅读(1290) 评论(0) 推荐(0) 编辑
摘要: /** * 金额转化格式 * 格式化数字,将字符串格式的数字,如:1000000 改为 1 000 000 这种展示方式 */function formatNumber(ele){ ele = ele ? new Number(ele).toFixed(2) + '': '0.00'; return 阅读全文
posted @ 2020-04-14 14:16 星空飘渺 阅读(472) 评论(0) 推荐(0) 编辑
摘要: web:http://www.htmleaf.com/jQuery/Image-Effects/201608063830.html demo:http://www.htmleaf.com/Demo/201608063831.html 基于PhotoClip移动端上传图片裁剪 web:http://w 阅读全文
posted @ 2020-01-15 15:15 星空飘渺 阅读(759) 评论(0) 推荐(0) 编辑
摘要: 文章来源:https://www.cnblogs.com/lichunyan/p/8214600.html 一:全局 1.阻止弹出层下面的页面滚动 给弹出层的最外层标签上加@touchmove.prevent 二:ipone 1.readonly与disabled 在iphone下,输入框为read 阅读全文
posted @ 2020-01-14 16:07 星空飘渺 阅读(1809) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页