- 博客(12)
- 问答 (2)
- 收藏
- 关注
转载 JavaScript : prototype
不使用prototype属性定义的对象方法,是静态方法,只能直接用类名进行调用。另外,此静态方法中无法使用this变量来调用对象其他的属性。 使用prototype属性定义的对象方法,是非静态方法,只有在实例化后才能使用。其方法内部可以this来引用对象自身中的其他属性。
2017-09-09 21:40:59 191
原创 JavaScript : Array.prototype.concat()中涉及嵌套数组
根据Mozila中关于Array.concat()的用法注意到:var arr = [[1],2,[3]];[].concat(...arr);//[1,2,3]区别于:var arr = [[1],2,[3]];[].concat(arr);//[[1],2,[3]]此处嵌套数组的连接需要注意。详见:Mozila:Concatenating values to an array,Concate
2017-09-09 19:54:56 524
转载 JavaScript : 选择语句
function testSize(num) { if(num<5){ return "Tiny"; } else if(num<10){ return "Small"; } else if(num<15){ return"Medium"; } else if(num<20){
2017-08-17 17:38:01 802
转载 JavaScript : 命名
In JavaScript all variables and function names are case sensitive.Variable names can be made up of numbers, letters, and $ or _ , but may not contain spaces or start with a number.When JavaScript
2017-08-17 17:35:13 303
转载 JavaScript : isNaN()和Number.isNan()
Number.isNaN(NaN); // trueNumber.isNaN(Number.NaN); // trueNumber.isNaN(0 / 0); // trueisNaN(NaN); // trueisNaN(undefined); // trueisNaN({}); // true// e.g. these would hav
2017-08-17 17:20:59 660
转载 jQuery : selector选择器
1.基本选择器$("#id")//ID选择器$("div")//元素选择器$(".classname")//类选择器$(".classname,.classname1,#id1")//组合选择器2.层次选择器$("#id>.classname ")//子元素选择器$("#id .classname ")//后代元素选择器$("#id + .classname ")//紧邻下一个元素选择器
2017-08-17 17:02:25 3773
原创 Bootstrap : 栅格对应的屏幕尺寸
.col-xs- (<768px) .col-sm- (≥768px) .col-md- (≥992px) .col-lg- (≥1200px)
2017-08-17 16:54:00 2169
原创 Bootstrap : jumbostron作用
.jumbostron:enlarge headingapproprate margin border-raduis
2017-08-17 16:48:41 450
原创 Bootstrap : container 和container-fluid区别
Bootstrap responsive:.container-fluid{ margin:0;}.container{ margin:0 15px 0 15px; }
2017-08-17 16:45:47 549
原创 Bootstrap : 栅格
Bootstrap responsive: <div class="container-fluid">{margin:0;} <div class="container">{ margin:0 15px 0 15px;} .jumbostron:*enlarge heading *approprate margin *border-raduis icon:<div class="
2017-08-17 16:40:17 438
原创 CSS优先级
id & class in CSS is case sensitive!!! id & class in CSS is case sensitive!!! body font color was overridden by:<style> body { background-color: black; font-family: Monospace; color: gre
2017-08-17 16:26:56 335
原创 正则表达式 regular expression
/ is the start of the regular expression. the is the pattern we want to match. / is the end of the regular expression. g means global, which causes the pattern to return all matches in the string, n
2017-08-17 16:20:34 397
空空如也
javascript:arr=[] 和 true & false的关系
2017-09-02
javascript中function-x(1)(2)怎样取第二个括号中的值?
2017-08-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人