Skip to content

Instantly share code, notes, and snippets.

View Alex-xd's full-sized avatar
🎯
Focusing

Boyuan Zhang Alex-xd

🎯
Focusing
View GitHub Profile
<style type="text/css">
/*IE 10 */
select::-ms-expand{
display: none;
}
select{
/* Chrome */
-webkit-appearance: none;
/* Firefox */
-moz-appearance: none;
$(document.links).filter(function() {
return this.hostname != window.location.hostname;
}).attr('target', '_blank');
@Alex-xd
Alex-xd / _typeof.js
Created September 20, 2016 08:52
最有用的JS类型检测!
function _typeof(something){
return Object.prototype.toString.call(something).slice(8,-1);
}
@Alex-xd
Alex-xd / 1.js
Created September 13, 2016 05:01
找出下面代码的规律并且编写一个函数,转换特定的整数到对应的字符串。 1 => A,2 => B,3 => C,...,26 => Z,27 => AA,28 => AB,29 => AC,...,52 => AZ,53 => BA,...
function convert(num){
var result = ""
while(num){
result = String.fromCharCode( --num % 26 + 65) + result
num = Math.floor(num / 26)
}
return result
}
@Alex-xd
Alex-xd / oo.js
Created September 10, 2016 02:51
一段代码解释JavaScript面向对象
作者:颜海镜
链接:https://zhuanlan.zhihu.com/p/22388052
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
(function(){
//私有静态成员
var user = "";
//私有静态方法