牛客606162351号
牛客606162351号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客606162351号的博客
全部文章
(共10篇)
题解 | #替换链接#
function link() { let str = jsContainer.innerText; //let str = 'test http://www.testhaha.com test test '; const w = '[a-zA-Z0-9]+' co...
2023-05-28
0
321
题解 | #表格排序#
function sort(type, order) { const frag = document.createDocumentFragment(); const trList = [].slice.call(jsList.children,0); const len = ...
2023-05-27
0
334
题解 | #购物车#
function add(items) { const tbody = select('tbody')[0]; for(let i = 0; i < items.length;i++) { tbody.innerHTML += `<tr> ...
2023-05-27
0
328
题解 | #使用 apply 调用函数#
function callIt(fn,...rest) { return fn.apply(null,rest); }
2023-05-26
0
272
题解 | #根据包名,在指定空间中创建对象#
function namespace(oNamespace, sPackage) { if (!sPackage.length) return oNamespace; const list = sPackage.split("."); const key = list.shift()...
2023-05-25
0
292
题解 | #dom 节点查找#
function commonParentNode(oNode1, oNode2) { let n1 = oNode1, n2 = oNode2; //判断刚开始传入的是否为同一元素 if(n1.isSameNode(n2)) return n1; c...
2023-05-25
1
303
题解 | #虚拟DOM#
const _createElm = vnode => { // 补全代码 const {tag,props,text,children} = vnode; if (!tag) { ...
2023-05-25
1
296
题解 | #字体高亮#
var text = document.querySelector(".text"); var search = document.querySelector("input"); const btn = document.querySelector("...
2023-05-25
0
231
题解 | #接口#
let data = [ {name: 'nowcoder1'}, {name: 'nowcoder2'} ], l=data.length; ...
2023-05-25
1
303
题解 | #购物面板#
zjtaiduola.onclick = function() { setZj(getZj() - 1); } zjtaishaola.onclick = function() { ...
2023-05-25
0
256