This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
最近传疯了的一道测试题,据说IQ125以上的人才知道答案 | |
9 = 72 | |
8 = 56 | |
7 = 42 | |
6 = 30 | |
5 = 20 | |
3 = ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
用js如何精确的计算出前端页面渲染加载时间? | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 分别用原生js,jquery实现dom的curd。就是节点的增加、删除、修改、选择、移动、复制。 | |
2. 用原生js实现类似jquery的append,prepend,after,before,wrap,unwra多种位置的插入操作。 | |
只是实现位置的插入,并不是完整的jquery的功能。 | |
比如: | |
append : <div id="div"><span>原有节点</span>待插入的节点<div> | |
prepend : <div id="div">待插入的节点<span>原有节点</span><div> | |
after : <div id="div"><span>原有节点</span><div>待插入的节点 | |
before : 待插入的节点<div id="div"><span>原有节点</span><div> | |
wrap : <div data-title="待包裹节点"><div id="div"><span>原有节点</span><div></div> | |
unwrap : 删除包裹节点后:<div id="div">待插入的节点<span>原有节点</span><div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
先不要运行,在回复中写出以下的结果: | |
1. var a; typeof a; | |
2. var s; s++; | |
3. !!'false'; | |
4. !!undefined; | |
5. typeof -Infinity; | |
6. 10 % '0'; | |
7. undefined == null; | |
8. typeof '2E+2'; | |
9. a = 3e+3; a++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
用速度最优的代码输出一个带有细线表格的乘法口诀表。 | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
用速度最优的代码输出一个用"A"拼凑而成的平行四边形。 | |
A | |
AAA | |
AAAAA | |
AAAAAAA | |
AAAAAAAAA | |
AAAAAAA | |
AAAAA | |
AAA | |
A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
输出一个用"A"拼凑而成的心形。 | |
AAA AAA | |
AAAAA AAAAA | |
AAAAAAAAAAAAA | |
AAAAAAAAAAA | |
AAAAAAAAA | |
AAAAAAA | |
AAAAA | |
AAA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
请说出以下的区别: | |
1. $('p').get(), | |
2. $('p')[1], | |
3. $('p').eq(0), | |
4. $('p').index() | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
请说出以下的区别: | |
1. $, $.fn | |
尤其是在写插件的时候? | |
$.fn.hilight = function( options ){}; | |
$.hilight = function( options ){}; | |
2. on,bind,live,delegate | |
3. 为什么要使用命名空间来绑定事件 | |
$().on('click.myEvent',fn) | |
4. $().animate()能控制css中所有的属性实现动画? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
请说出以下的区别: | |
1. $.get(), $.post() | |
2. closest, parent, parents, parentsUtil, offsetParent | |
3. offset, position, | |
4. find, children, filter, siblings | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code |