decimal aaa = 123;// 数值型string bbb =aaa.ToString(); // 转换为字符 bbb = bbb.PadLeft(7, "0"); // 共7位,之前用0补齐 response.write(bbb );