一、百分數轉化為小數
function toPoint(percent){ var str=percent.replace("%",""); str= str/100; return str; }
二、小數轉化為百分數
function toPercent(point){ var str=Number(point*100).toFixed(1); str+="%"; return str; }
一、百分數轉化為小數
function toPoint(percent){ var str=percent.replace("%",""); str= str/100; return str; }
二、小數轉化為百分數
function toPercent(point){ var str=Number(point*100).toFixed(1); str+="%"; return str; }
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。