简体   繁体   中英

String.fromCharCode only works with one character

I have javascript code:

s = String.fromCharCode(s);

This works but it only works with one character even though the String.fromCharCode method is supposed to work with multiple characters seperated by commas. Any ideas why this is?

如果您想要多个字符,则需要传递一系列值...

String.fromCharCode(65, 66, 67);  // "ABC"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM