漢字轉換拼音
<script src="Convert_Pinyin.js"></script><!--外掛引用-->
中文輸入:<input id="keyword" type="text" onBlur="ConvertName()"/>
全寫拼音:<input id="full" type="text" />
<script>
function ConvertName() {
var keyword = $('#keyword').val();
var full = pinyin.getFullChars(keyword); //獲取全寫拼音
//大寫字母前面空格分開
var reg=/[A-Z]/g;
var full = full.replace(reg,function (world) {
return " "+world;
});
full = $.trim(full);
$('#full').val(full)
}
</script>
Convert_Pinyin.js下載
連結:https://pan.baidu.com/s/1lKEpGCIA_e4_SQjCw...
提取碼:q8t8
本作品採用《CC 協議》,轉載必須註明作者和本文連結