你说的是javascript吧 var i=1; var s=i+'';反过来是转时 var s='1'; var i=s*1;
你给他赋值字符串,就是String,赋值数字,就是Int,赋值true/false,就是布尔……
直接用吧