【转载】jq 阿拉伯数字转换为汉字标题一、二、三
function convertToChinese(num) { let N = [ "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" ]; let str = num.toString(); let len = num.toString().length; let C_Num = []; for (let i = 0; i < len; i++) { C_Num.push(N[str.charAt(i)]); } return C_Num.join(''); },
原文地址:https://blog.csdn.net/weixin_42779368/article/details/93468890