摘要:
例如我们希望输出的数字长度是固定的,假设为10,如果数字为123,则输出0000000123,不够位数就在之前补足0,这里提供了三种不同的方式实现JS代码给数字补0的操作: 方法1 function PrefixInteger(num, length) { return (num/Math.pow( 阅读全文
摘要:
设置另一个button和text替代input file,隐藏input file。 <input type="file" id="tts-input-text" accept="text/plain" onChange={readFile} onClick={(e: any) => (e.targ 阅读全文