1-1
//1.行内
<div onclick="alert(1)">div</div>
//2.内嵌html页面中
1-2string,boolean—>number
Number();
1-3string—>number
特点:只能识别纯数字的字符串,其他的输出NAN
var str ="3";
console.log(Number(str))//3
console.log(Number("3.o"))//3
console.log(Number("3px")) //NaN
1-4boolean—>number
特点:0识别为false,其他的都为true
1-5number,string—>boolean
Boolean();
1-6numder—>boolean
特点:0识别为false,其他的都为true
1-7string—>boolean
特点:""识别为false,其他都为true
1-8any-string
string();
string();
tostring();