光辉飞翔

导航

 

number = string*1;

string = number+'';

 

 var str = '012.8372';
 var s = 0;
 str = str*1;
 alert(typeof(str));//number
 s += '';
 alert(typeof(s));//string
 var boo = true;
 alert(typeof(boo));//boolean
 var bs = Boolean(s);
 alert("bs:"+typeof(bs));
 alert("bsv:"+bs);//true

posted on 2012-10-29 17:08  光辉飞翔  阅读(2050)  评论(0编辑  收藏  举报