摘要: ?=、?<=的使用举例 var str = "XXXX (程序员)"; var newStr,regExp; regExp = /(?<=().*(?=))/; newStr = str.match(regExp) console.log(newStr);//程序员 exp1(?=exp2):查找 阅读全文
posted @ 2021-01-19 10:26 Qionghuihe 阅读(2066) 评论(0) 推荐(0) 编辑
摘要: 1.替换url参数值 function replaceUrl(url, arg, val){ var pattern = arg+'=([^&]*)'; var replaceText = arg+'='+val; return url.match(pattern) ? url.replace(ev 阅读全文
posted @ 2021-01-19 10:07 Qionghuihe 阅读(559) 评论(0) 推荐(0) 编辑
摘要: withCredentials:默认情况下,跨源请求不提供凭据(cookie、HTTP认证及客户端SSL证明等)。通过将withCredentials属性设置为true,可以指定某个请求应该发送凭据。 默认值为false。 true:在跨域请求时,会携带用户凭证 false:在跨域请求时,不会携带用 阅读全文
posted @ 2020-06-15 17:34 Qionghuihe 阅读(4075) 评论(0) 推荐(1) 编辑
摘要: 请始终为按钮规定 type 属性。Internet Explorer 的默认类型是 "button",而其他浏览器中(包括 W3C 规范)的默认值是 "submit"。 有时候你点按钮会刷新页面,是因为HTML没有设置button的type属性,其默认为“submit”,提交页面了,要么点击时最好写 阅读全文
posted @ 2020-06-15 17:31 Qionghuihe 阅读(305) 评论(0) 推荐(0) 编辑
摘要: methods: { click(event){ // 当前点击的元素 event.target; // 绑定事件的元素 event.currentTarget; // (target与currentTarget的区别主要体现在使用事件委托时,发生事件委托时, // 点击的元素与绑定事件的元素非同一 阅读全文
posted @ 2020-06-12 17:33 Qionghuihe 阅读(1190) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-06-09 10:01 Qionghuihe 阅读(0) 评论(0) 推荐(0) 编辑
摘要: function getIndexById(tree, indexID) { var stark = []; stark = stark.concat(tree); while (stark.length > 0) { var temp = stark.shift(); if (temp.nodes 阅读全文
posted @ 2020-06-05 09:58 Qionghuihe 阅读(218) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-06-05 09:55 Qionghuihe 阅读(0) 评论(0) 推荐(0) 编辑
摘要: var $val = $("#son").val(); $("#parent", window.parent.document).val($val); $(".clear", window.parent.document).hide(); 阅读全文
posted @ 2020-06-05 09:53 Qionghuihe 阅读(320) 评论(0) 推荐(0) 编辑
摘要: $(function () { $('[data-toggle="popover"]').popover() }) 阅读全文
posted @ 2020-05-22 15:24 Qionghuihe 阅读(516) 评论(0) 推荐(0) 编辑