- 博客(4)
- 资源 (4)
- 收藏
- 关注
原创 解决JS打开新窗口被浏览器拦截的问题
今天有一个需求是当用户需要获取到自己上传的资源链接,然后点击查看跳转到对应的资源挂载点。突然发现使用JS的window.oepn()操作会导致浏览器拦截。 原来当window.open为用户触发事件内部或者加载时,不会被拦截,一旦将弹出代码移动到一段异步代码内部,就会被拦截。 因此我们通过ajax必须设置成同步模式即可解决。 $.ajax({ url:url, ...
2018-08-23 13:17:31 4759
原创 【LeetCode】865. Smallest Subtree with all the Deepest Nodes
Given a binary tree rooted at root, the depth of each node is the shortest distance to the root. A node is deepest if it has the largest depth possible among any node in the entire tree. The subtree...
2018-08-04 17:40:08 280
原创 【LeetCode】788. Rotated Digits
X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotated - we cannot choose to leave it alone. A number...
2018-08-01 22:12:16 193
原创 【LeetCode】783. Minimum Distance Between BST Nodes
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Input: root = [4,2,6,1,3,null,null] Output: 1 Expl...
2018-08-01 21:22:47 161
JAVA开源项目合集中文电子书
2018-05-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人