攀登者1号
攀登者1号
全部文章
分类
题解(8)
归档
标签
去牛客网
登录
/
注册
攀登者1号的博客
全部文章
(共9篇)
题解 | #有效括号序列#
/** * * @param s string字符串 * @return bool布尔型 */ function isValid( s ) { // write code here  ...
栈
2022-08-19
0
232
题解 | #简易计算器#
var Calculator = { init: function () { var that = this; if (!that.isInited) { that.isInited = true; // 保存操作信息 ...
2021-08-30
0
417
题解 | #设置标签#
var tagInput = { isInited: false, init: init, bindEvent: bindEvent, addTag: addTag, removeTag: removeTag};tagInput.init(); function ini...
2021-07-12
0
420
题解 | #dom节点转成json数据#
function dom2json() { var father = document.getElementById('jsContainer'); function js(dom){ var obj = { ...
2021-07-12
0
562
题解 | #移动控制#
function bind(){ document.onkeydown = function(event){ if (!event) return; var code = event.keyCode || ''; ...
2021-07-09
0
423
题解 | #分页#
function Pagination(container, total, current) { this.total = total; this.current = current; this.html = html; this.val = ...
2021-07-08
0
412
题解 | #替换链接#
极限时间通过 randomFn(); function randomFn() { var arrRed = [];  ...
2021-07-06
0
449
题解 | #替换链接#
也就匹配了下网页正则,没啥好说。function link() { var reg = /(http://|https://|www.)\w+(.\w+)+(?\w+=\w+)?(#\w+)?/g; var father = document.getElementById('jsCont...
2021-07-03
0
457
题解 | #获取 url 参数#
获取每个元素存在的次数在根据大于1出现次数的放入到新数组中function duplicates(arr) { var obj = {}; var newarr = []; arr.forEach((item) => { if(obj[item]){ ...
2021-06-30
0
362