<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>js汉字转拼音</title>
<style type="text/css">
.span_color{
color: #9E9E9E;
display: block;
}
</style>
</head>
<body>
<h2>汉字转拼音</h2>
<div>
<span>输出类型:</span>
<label><input type="radio" name="pinyin_type" value="0" checked="">带声调拼音</label>
<label><input type="radio" name="pinyin_type" value="1">不带声调拼音</label>
<label><input type="radio" name="pinyin_type" value="2">拼音首字母</label>
</div>
<div>
<span>多音字:</span>
<label><input type="checkbox" name="polyphone">简单支持多音字</label>
<span class="span_color">(支持多音字仅仅是将所有可能的组合列举出来,要做到准确识别多音字还需非常完善的词库)</span>
</div>
<span>输入需要转化的中文内容:</span><input type="text" id="test" value="汉子转拼音" placeholder="请随便输入一些中文">
<h3>转换结果:</h3>
<div id="result">shǎ bī</div>
</body></html>
<!-- 中文转化拼音调用方法 -->
<script src="./pinyin_dict_withtone.js"></script>
<script src="./pinyinUtil.js"></script>
<script src="./index.js"></script>
评论0