2018.3
/**
*龙珠
*/
<p>
1.doctype的作用?标准模式与兼容模式有什么区别?
2.行内元素有哪些?块级元素有哪些?空(void)元素有哪些?
3.html5有哪些新特性,新元素?如何处理html5新标签的浏览器兼容问题?如何区分HTML和HTML5?
4.描述一下cookie和sessionStorage和localStorage的区别?
5.webSocket如何兼容低版本浏览器?
6.介绍一下标准的css的盒子模型?低版本IE的盒模型有什么不同?
7.css选择符有哪些?哪些属性可以继承?css的权重怎么定义?
8.用纯css创建一个三角形的原理是什么?
9.li与li之间看不见的空白间隙是什么原因引起的?有什么解决办法?
10.什么是css预处理器/后处理器?
11.JavaScript有几种值类型?
12.ajax是什么?如何创建一个ajax?同源策略是什么?使用它有什么问题?
13.什么是闭包,为什么要用他?
14.json和jsonp分别是什么?
</p>
/**
* 龙珠
*/
var arr = [11<12<13 , 13<14<15];
var str = "1 2 3".replace(/\d/g,parseInt);
var bool = ([] == []);
var str1 = '5' + 3;
var str2 = 5 + 3;
var str3 = 5 + "3";
var a = [1,2,3],
b = [1,2,3],
c = [1,2,4],
res1 = (a == b),
res2 = (a === b),
res3 = (a > c),
res4 = (a<c);
var one = 0.1,
two = 0.2,
six = 0.6,
eight = 0.8,
red1 = two - one == one,
red2 = eight - six == two;
function show(params) {
switch (params) {
case 'A':
console.log("A");
break;
case 'B':
console.log("B");
break;
case undefined:
console.log("undefined");
break;
default:
console.log('idontknow');
break;
}
}
show(String('A'))
show(new String('A'));
var a = [0];
if ([0]) {
console.log(a == true);
}else{
console.log("a");
}
var arr = Array(3);
arr[0] = 2;
var res = arr.map(function (params) {
return "1";
})
function f() {
var a = f.prototype,
b = Object.getPrototypeOf(f);
console.log(a);
console.log(b);
console.log(a === b);
}
f();
function a(arr) {
arr[0] = arr[2];
}
function b(c,d,f) {
f = 10;
a(arguments);
return c + d + f;
}
b(1,1,1);
/**
* 兴业证券
*/
// var a = [];
// var a = {};
// var a = ();
// var a = //;
// 关键字与保留字
// calss viod parent with
var a = [1,2];
console.log(a.concat([3,4],[[5,6]]).join(" "));
console.log(a.concat([3, 4], [[5, 6]]).length);
null === undefined;
null == undefined;
null instanceof Object;
NaN == NaN;
function a() {
try {
return "try";
} catch (error) {
return "err";
}finally {
return "finally";
}
}
a();
var F = function () { };
var P = F.prototype;
var C = P.constructor;
console.log(C === F , C == F);
typeof F;
function foo() {
"use strict";
return !this;
}
function boo() {
return !this;
}
console.log(foo() + " " + boo());
var arr = [];
arr[-1] = -1;
console.log(arr);
console.log(arr.length);
arr[0] = 0;
var len = arr.length;
arr[1024] = 1024;
console.log(arr);
var len1 = arr.length;
console.log(len + " " + len1);
var parent = {r:1};
var c = Object.create(parent);
c.r = 3;
console.log(parent.r + " " + c.r);
function res(x) {
if (x % 2 === 0) {
return
false;
}
return true;
}
console.log(res(1) + " " + res(2));
var s = "12345";
s.len = 4;
var t = s.len;
console.log(t);
const greet = [];
for (let i = 0; i < 10; i++) {
greet.push(function () {
return console.log(i);
})
}
greet[0]();
greet[1]();
网友评论