Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

拼音首字母小写 #22

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

一个实现汉字与拼音互转的小巧web工具库,另外还包含一个非常非常简单的JS版拼音输入法。




支持小写字母,演示地址:

http://chordmo.github.io/pinyinjs/








原演示地址:

演示地址:http://demo.haoji.me/pinyinjs/

支持多音字演示:http://demo.haoji.me/pinyinjs/polyphone.html
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ <h2>汉字转拼音</h2>
<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>
<label><input type="radio" name="pinyin_type" value="2"/>拼音首字母大写</label>
<label><input type="radio" name="pinyin_type" value="3"/>拼音首字母小写</label>
</div>
<div>
<span>多音字:</span>
Expand Down Expand Up @@ -99,6 +100,7 @@ <h2>JS实现简单的拼音输入法</h2>
case '0': result = pinyinUtil.getPinyin(value, ' ', true, polyphone); break;
case '1': result = pinyinUtil.getPinyin(value, ' ', false, polyphone); break;
case '2': result = pinyinUtil.getFirstLetter(value, polyphone); break;
case '3': result = pinyinUtil.getFirstLetter(value, polyphone).toLowerCase(); break;
default: break;
}
}
Expand Down