摘要:
?=、?<=的使用举例 var str = "XXXX (程序员)"; var newStr,regExp; regExp = /(?<=().*(?=))/; newStr = str.match(regExp) console.log(newStr);//程序员 exp1(?=exp2):查找
阅读全文
posted @ 2021-01-19 10:26
Qionghuihe
阅读(2255)
推荐(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
阅读(589)
推荐(0)
摘要:
withCredentials:默认情况下,跨源请求不提供凭据(cookie、HTTP认证及客户端SSL证明等)。通过将withCredentials属性设置为true,可以指定某个请求应该发送凭据。 默认值为false。 true:在跨域请求时,会携带用户凭证 false:在跨域请求时,不会携带用
阅读全文
posted @ 2020-06-15 17:34
Qionghuihe
阅读(4199)
推荐(1)
摘要:
请始终为按钮规定 type 属性。Internet Explorer 的默认类型是 "button",而其他浏览器中(包括 W3C 规范)的默认值是 "submit"。 有时候你点按钮会刷新页面,是因为HTML没有设置button的type属性,其默认为“submit”,提交页面了,要么点击时最好写
阅读全文
posted @ 2020-06-15 17:31
Qionghuihe
阅读(329)
推荐(0)
摘要:
methods: { click(event){ // 当前点击的元素 event.target; // 绑定事件的元素 event.currentTarget; // (target与currentTarget的区别主要体现在使用事件委托时,发生事件委托时, // 点击的元素与绑定事件的元素非同一
阅读全文
posted @ 2020-06-12 17:33
Qionghuihe
阅读(1233)
推荐(0)
posted @ 2020-06-09 10:01
Qionghuihe
阅读(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
阅读(228)
推荐(0)
posted @ 2020-06-05 09:55
Qionghuihe
阅读(0)
推荐(0)
摘要:
var $val = $("#son").val(); $("#parent", window.parent.document).val($val); $(".clear", window.parent.document).hide();
阅读全文
posted @ 2020-06-05 09:53
Qionghuihe
阅读(324)
推荐(0)
摘要:
$(function () { $('[data-toggle="popover"]').popover() })
阅读全文
posted @ 2020-05-22 15:24
Qionghuihe
阅读(521)
推荐(0)