6.JS方法

1.        .length()    获取字符串长度

2.         typeof           检测数据类型//prompt取得值是字符型

3.         toString()  转为字符串

4.          string()     强转

5.           parseInt()     转为number型      parseFloat() //浮点型

6.        Boolean()        //空,否定的转为false        其余为   true

原文地址:https://www.cnblogs.com/cai-bai/p/11674215.html