javascript 如何取前几位字符取字符串的?var str = '0123456789'var tmp = str.slice(0, 5)console.log(tmp) "01234"只需要字符串的 slice(”开头索2023-03-02JavaScript140