jQuery.Hz2Py.js插件實(shí)現(xiàn)的漢字轉(zhuǎn)拼音是一款很實(shí)用的在線轉(zhuǎn)換功能,此插件已經(jīng)把漢字打包成一個(gè)插件庫,調(diào)用的時(shí)間很簡單,只調(diào)用一個(gè)方法就可以實(shí)現(xiàn)轉(zhuǎn)換了
可以實(shí)現(xiàn)基于jQuery實(shí)現(xiàn)漢字轉(zhuǎn)換成拼音代碼。這是一款基于jQuery.Hz2Py.js插件實(shí)現(xiàn)的漢字轉(zhuǎn)拼音特效。插件自行下載。使用方法如下(注意修改jq的引入路徑)。
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>基于jQuery實(shí)現(xiàn)漢字轉(zhuǎn)換成拼音代碼</title>
- <style type="text/css">
- #content{
- border: 1px #dbdbdb solid;
- width: 700px;
- height: 50px;
- padding: 10px;
- font-size: 13px;
- line-height: 23px;
- letter-spacing: 15px;
- }
- #show{
- border: 1px #dbdbdb solid;
- width: 700px;
- height: 50px;
- padding: 10px;
- font-size: 12px;
- color: #FF0000;
- line-height: 23px;
- margin-top: 2px;
- letter-spacing: 1px;
- overflow-x: hide;
- overflow-y: auto;
- }
- #show a {
- color: #FF0000;
- font-size: 13px;
- font-weight: bold;
- }
- </style>
- <script src="js/jquery.min.js"></script>
- <script type="text/javascript" src="js/jQuery.Hz2Py-min.js"></script>
- <script type="text/javascript">
- $(function () {
- $("#content").live("keyup keydown change blur", function () {
- $("#show").val($(this).toPinyin());
- });
- });
- </script>
- </head><body>
- <center>
- 在這里輸入漢字 <textarea id="content"> </textarea> <textarea id="show"></textarea>
- </center></body></html>
以上所述就是本文的全部內(nèi)容了,希望大家能夠喜歡。
新聞熱點(diǎn)
疑難解答
圖片精選