返回由字符串转换得到的整数。parseInt(numString, [radix])
参数
numString 
必选项。要转换为数字的字符串。 
radix 
可选项。在 2 和 36 之间的表示 numString 所保存数字的进制的值。如果没有提供,则前缀为 '0x' 的字符串被当作十六进制,前缀为 '0' 的字符串被当作八进制。所有其它字符串都被当作是十进制的。 
说明
parseInt 方法返回与保存在 numString 中的数字值相等的整数。如果 numString 的前缀不能解释为整数,则返回 NaN(而不是数字)。parseInt("abc")     // 返回 NaN。
parseInt("12abc")   // 返回 12。
可以用 isNaN 方法检测 NaN。

解决方案 »

  1.   

    字符串,因为是值传递。
    <script>
    var fis_perd_to = "1";
    parseInt(fis_perd_to);
    alert(typeof(fis_perd_to);
    fis_perd_to=parseInt(fis_perd_to);
    alert(typeof(fis_perd_to);
    </script>
      

  2.   

    sorry<script>
    var fis_perd_to = "1";
    parseInt(fis_perd_to);
    alert(typeof(fis_perd_to));
    fis_perd_to=parseInt(fis_perd_to);
    alert(typeof(fis_perd_to));
    </script>
      

  3.   

    var fis_perd_to = "1";
    parseInt(fis_perd_to);  //fis_perd_to这里你没有对它重赋值,fis_perd_to是字符var fis_perd_to = "1";
    fis_perd_to = parseInt(fis_perd_to);  //fis_perd_to 是数字