定义日志输出函数 (function(){ if(window['console']){ return; } window['console'] = { log: function(){} ,clear: function(){} ,debug: function(){} ,error: function(){} ,info: function(){} ,count: function(){} ,time: function(){} ,trace: function(){} ,warn: fun…
前言 一线大厂笔试题灵感来源 目录: 第一部分:数组 第二部分:函数 第三部分:字符串 第四部分:对象 第五部分:数字 第六部分:浏览器操作及其它 筛选自以下两篇文章: <127 Helpful JavaScript Snippets You Can Learn in 30 Seconds or Less> <30 seconds of code> 原本只想筛选下上面的那篇文章,在精简掉了部分多余且无用的代码片段后,感觉不够.于是顺藤摸瓜,找到了原地址:30 seconds of…
js原生工具库 1.isStatic:检测数据是不是除了symbol外的原始数据 */ function isStatic(value) { return( typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || typeof value === 'undefined' || value === null ) } /** 2.isPrimitive:检测数据是不是原始数据 */…
JS选取DOM元素的方法注意:原生JS选取DOM元素比使用jQuery类库选取要快很多1.通过ID选取元素document.getElementById('myid');2.通过CLASS选取元素document.getElementsByClassName('myclass')[0];3.通过标签选取元素document.getElementsByTagName('mydiv')[0];4.通过NAME属性选取元素(常用于表单)document.getElementsByName('mynam…
1 类型判断 isString (o) { //是否字符串 return Object.prototype.toString.call(o).slice(8, -1) === 'String' } isNumber (o) { //是否数字 return Object.prototype.toString.call(o).slice(8, -1) === 'Number' } isBoolean (o) { //是否boolean return Object.prototype.toString…
1.isStatic:检测数据是不是除了symbol外的原始数据 function isStatic(value) { return ( typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || typeof value === 'undefined' || value === null ) } 2.isPrimitive: 检测数据是不是原始数据 function isPrim…
/** * Copyright 2017 Google Inc., PhantomJS Authors All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Licens…
作者: 牛A与牛C之间 时间: 2013-11-21 分类: 技术文章 | 暂无评论 | 编辑文章 主页 » 技术文章 » 第6篇:Xilium CefGlue 关于 CLR Object 与 JS 交互类库封装报告:自动注册JS脚本+自动反射方法分析 第6篇:Xilium CefGlue 关于 CLR Object 与 JS 交互类库封装报告:自动注册JS脚本+自动反射方法分析 本文转自“吾乐吧软件站”,原文链接:http://www.wuleba.com/?p=23624 感兴趣的,可以加入…
微软在浏览器IE11中对F12开发人员工具的UI进行了彻底的换脸,虽然有诸多的不习惯但也是有方便之处的,比如我们用到的最多的断点调试,在F12调试状态下会加载出页面的js脚本文件,而需要对某个文件中的方法进行调试,找到该方法加个断点即可(同VS中加断点的方式),不需要再在脚本源文件中加debugger那么麻烦了.…
Dynamics CRM 365 不用按钮工具,直接用js脚本控制按钮的显示隐藏: try { // 转备案按钮 let transferSpecialRequestButton = parent.parent.document.getElementById("new_srv_update|NoRelationship|Form|vivo.Form.new_srv_update.MainTab.Save.btnTransferSpecialRequest"); if (!transfe…