简单好用的插件:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script src="js/Convert_Pinyin.min.js"></script>
<script>
var fullName = pinyin.getFullChars("你好");
console.log(fullName);
</script>
</body>
</html>
输出:
下载地址: https://download.csdn.net/download/freedomvenly/10410018