javascript替换百分号 js去除百分

js 去掉input标签中的百分号【%】

parseInt("100%")  --100

parseFloat("17%")     --17

 

 <span  style="width:28%; text-align:center;"><a-progress :stroke-color="{
        '0%': '#2e9afe',
        '100%': '#24fde5',
      }" size="small" :showInfo="false" type="line" :percent="parseInt(item.transformRate)" :width="66"></a-progress></span>

item.transformRate 是个带%的数值 运用组件要去掉%
posted @ 2023-06-27 14:52  雪莉06  阅读(663)  评论(0编辑  收藏  举报