Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

javascript - 在JavaScript中将字符转换为ASCII代码(Convert character to ASCII code in JavaScript)

How can I convert a character to its ASCII code using JavaScript?

(如何使用JavaScript将字符转换为ASCII码?)

For example:

(例如:)

get 10 from "\n".

(从“ \ n”获得10。)

  ask by levik translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
"
".charCodeAt(0);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...