Javascript code for converting Chinese characters into pinyin _ javascript skills

Source: Internet
Author: User
Code for converting javascript Chinese characters to PinYin

"Script" var strGB = "ah, ah, sorry, no cancer, no. I love the saddle, ammonia, and I'm proud of the dark shore amine case. ao Yi AO ba target Harrow ba Bai defeat Bai banban move pull like board dress mix with flap half-run Bangbang Bang bang bao Bei times embarrassed ready for baking Ben benbenbenbenbenbenbenbenbenbenbenbenbenbenbenbenbenbenbenweitao pump burst into the force nose than the computation pen Bi Bian cover biyun coin pibi closed the disadvantages of the wall arm to avoid the Bian bian will be changed to the Bian Biao Yu table Yu Xiao Bin bing Bo playing pot bo platinum foil bo cangcang cangzang operations rough groove Cao toilet policy side volume test layer rub inserted cross cutting tea cha difference Xiao jie Chai Yi mixing Chan yi wrapped around shovel production explanation chang sang Song Chao Xiaochao Chao song car pull from Chen Shen chen yu lining support cheng raise Qiu silk and look at the ugly smell. The first time the cupboard is located, the kitchen is located, the chicks are located in addition to the Chu Foundation storage. Chuanchuan wear Chuan chuba Chuang chuxiao Yan hammer hanging Chun Zi magnetic female ci CI Cong scallianz from the cluster together crude vinegar cluster to promote zookeeper kill Cui urged brittle kicui village Cun Jin to answer the question to beat Big stay or wearing a belt loan bag to catch slack Dan Dao didi di yi Diao throw Yi fall hanging fishing tune fall dad dish butterfly overlapping stacked Ding staring Ding ding lost Dong understands Dong Han Dong Leng frozen hole pocket shake fight steep bean tease acne du du Duan satin heap against the team on dunton Dunning blunt shield Duo fan FAN Fang anti-fake access Fang Fei Yu Fei Fen fen fen angry dung FENG Yu Yin Feng fo Fu fu Women's bind lingga the change of calcium cover dry Gan Gang gang Gao Mo Bing cake to engage in pick draft notice ge put Ge A total of hooks, troughs, gradients, dogs, dirt structures, enough mushrooms, Gugu Gu guan can be used to fill guanguang Guang Xi GUI silicon GUI Roll Stick pot Guo wrapped through ha Xi child Hai he han hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahehe luohe luhe hehe he He he hu arc Hu HU huhua Hua Yi slippery painting cut words Huai bad Huan HUan phantom shortage panic Huang Zho reed Huang Yao Lie gray hui Yin wedding soul muddy mixed living group fire get or confuse Huo's curse attack Ji ji Jia pod cheek Jia potassium fake price frame marry Jian jian Jiang Xi Jiang paddle award Jiang Jiao Zheng Jiao Jian handed in the cutting-and-cutting tutorial, jiaojie jie Jin jin Jing the embarrassing research and correction of jiu Yao JU sentence fear tornado donate Juan tired roll Jue Jun ka Kai kai journal Kan kan kan cut to see Kang Yi Kang Yu test copy roast rely on Xiao Ke tree ke dry cry cave kubernetes Ku qukuo lala la wax La la Lai LAN Lang LAN lei Li Li Lian Liang liang Liangliang's two vehicles were sold out. Sorry, He was chatting about medical treatments. Liao was reported to be split, and he was beaten. Lin, P Lin, Lin ling Liu Ling lu lun on luoluo bare luoluo Ma code, Ma, and so on? Buried buy Mai Yu manman slow manmanmang blind Maomao Mao mei Meng mengyi Meng Mn Meng Miao ether Mi Mian Miao Jian Miao XI min mu na which I na neneam Nai Nan capsule scratching the brain annoying Ah neon nininini sleep all year round rolling Niang nig urine kneading nig Niang Ni Niyou Ning Niu twisting nets Nong Nuu Nuo Puxi panpan Pan Bian rebellion Pang ping fat throwing a plane gun robe run bubble embryo Pei Jian compensate accompanied by Pei spray basin bang peng touch batch phitay pi ping the broken horse is forced to throw and throw the pu Qi qi Qian sorry, the gun throws the cavity and the wall, and the Force grabs the slide and the shovel knocks on the bridge. Qiao CIDR qiaoqiao cut the eggplant and the hacker steals the Qin and the poultry go to bed qinqing light Hydrogen qingqing qing Qiu Zheng qu Yu qu Quan boxing dog coupons to persuade the lack of earchies, but magpie really que skirt group Ran dirty soil bustling so that the harassment around the hot man Renren Ren recognize the blade and throw still day rong Fu RuO soft Shen RuO weak Sasa Gill seasy sansan umbrella Sanxiao sorrow and sorrow, sorrow and sorrow, SENSA, sand and Sha Shan Shang Xiao Shan arsenic Shen Sheng Shen Shi Shen Sheng Shen shi Xi Shi shu shuoxian Shuang who water sleep tax sucking instant shun Shun said Shuo si search for Su the collapse of his it her Totta tarts when the tire Moss lifting Taitai too much state Jialu stalls greedy Tan tang if you lie down Tang tao set Teng Yi ti Xiao Tian Miao pick up the slide and paste the tie to the hall to listen to the hydrocarbon Ting boat Tong bucket Tong pain and steal the head through the convex bald burst figure Tutu tu TU tutu tutuo Tuo Yu dig WAF Wa Po po Wai Wan Wang Wei wei Wen wowu Wu Xi Wu Yi XI se Si Xi Xia xixia Xia scare Xian Xiang xiang oak Xiang Xiao diarrhea Xie jianxiao salary core zinc xin Xin Xing Xiong Xiu Shu Xi rust show XU Xu Xuan XU Xu xuxue Xue Xun xun Jian ya Yan yanyan Yang sample Yang Yao Yi yi yi Yin Ying ying Yu Yong Yu youyouyouyu youyouyouyouyouyouyouyouyouyouyouyouyouyouyouyouyouyouyouyouyouyu youyouyouyu youyouyu yu yuan miscellaneous planting Zai Dr zai again in my temporarily likes the dirty burial was the bad chisel algae jujube early bath flea noisy make soap stove dry responsibility selection then ze thief how to increase the amount of money was donated log on to the log, roll, pull, roll, roll zhang zhangzhang zhangzhangzhang account Account battle expansion zhazhao Zhao looking for Marsh Zhao cover fold Zhe zhe ge cane this Zhe Zhen needle Investigation zhenzhen zhengzheng Zhizhi Zhishou Zhi Zhizhi zhizhong Zhizhi zhong Zhou Zhe porridge axis elbow curse wrinkle Zhou Xi sudden Zhu Xiao Qianli Zhu storage cast build notice Zhu zhuzhu tuzhuo brick turn to make a profit pile Zhuang makeup hit Zhuang shaped vertebral cone chase pendant repair zhuzhuo table Zhuo zi zun Zuo Zheng zookeeper zookeeper zookeeper has been in the middle of the market. i'm sorry, I'm sorry, I am sorry, I am sorry. there are two schools in the United States. I have been talking about the problem of being an independent expert. Zookeeper and zookeeper the number of Chinese users in the border region is very small. I am very grateful to you for your reference. there are two major problems: inspector zookeeper zookeeper taobaoe taobaodi taobaoyu taobaobei taobaotaobao.com the scalpers of yundun When there is no conflict between the two statements, the two statements will be immediately followed. hey, hey, you know hey, you have a click, click it, and then click it. zookeeper zookeeper please refer to the following link for more information: please refer to the following documents for more information: i'm sure you're sure in the future, there will be a huge number of migration attacks. there are two groups of users who have been using these products. please refer to the following documents for more information: Yi Kai kai Zheng Wei please refer to the following link for more information: in our country, we have been looking forward to the rise of the number of zookeeper in our country. I have been talking about it all over the world. there are two groups of researchers in the United States. zookeeper and zookeeper have been released. please refer to the following link for more information: she was the only one who was the best. She was the only one who was the best. zookeeper is a Chinese Simplified Chinese there are two possible causes: Please refer to the following link for more information: zookeeper zookeeper zookeeper and zookeeper zookeeper and zookeeper OF THE UNITED STATES zookeeper zookeeper of the southern tainium taini Maina malong zookeeper of The United States zookeeper OF THE UNITED STATES I have a very good yarn. I have been very grateful to you for your reference. please refer to the following link for more information: zookeeper zookeeper | When the system was deployed, the zookeeper was successfully installed. during the peak hours, the master node of the master node. simhei Weiwei stewed wonton entropy iron wonton zookeeper and zookeeper even though it is difficult to understand the problems please refer to the following link for more information: ru, R, R, O, M, O, O, M, T zookeeper zookeeper and zookeeper. zookeeper zookeeper cadmium was engraved with zookeeper. Zookeeper zookeeper yardium Yarun yundun please refer to the following link for more information: zookeeper and zookeeper zookeeper very cute, very cute, very cute, and very cute. coupled with zookeeper, Zookeeper, and zookeeper. zookeeper yundun zookeeper rankus zookeeper and zookeeper there is a huge amount of money in the market. Zookeeper and zookeeper of the Communist Party of China zookeeper hybridhybriddb hybriddb for MySQL and zookeeper hybriddb for MySQL zookeeper zookeeper fermented soy sauce and maleic anhydride zookeeper oxyl ester zookeeper fermented grains zookeeper zookeeper and zookeeper during the process huang Wenwen, Wang Xiaoyu, Wang XiaoYu chinese Simplified Chinese keywords: epimitzilla, humerus, charm, and other keywords: artificial intelligence, artificial intelligence I have been deprecated by Yi Shilin Dai "; var qswhSpell = ["A", 0, "ai", 2, "an", 15, "ang", 24, "ao", 27, "ba", 36, "bai ", 54, "ban", 62, "bang", 77, "bao", 89, "bei", 106, "ben", 121, "beng", 125, "bi", 131, "bian", 155, "biao", 167, "bie", 171, "bin", 175, "bing", 181, "bo ", 190, "bu", 211, "ca", 220, "cai", 221, "can", 232, "cang", 239, "cao", 244, "ce", 249, "ceng", 254, "cha", 256, "chai", 267, "chan", 270, "chang", 280, "chao ", 293, "che", 302, "chen", 308, "cheng", 318, "chi", 333, "chong", 349, "chou", 354, "chu", 366, "chua I ", 382," chuan ", 383," chuang ", 390," chui ", 396," chun ", 401," chuo ", 408," ci ", 410, "cong", 422, "cou", 428, "cu", 429, "cuan", 433, "cui", 436, "cun", 444, "cuo", 447, "da", 453, "dai", 459, "dan", 471, "dang", 486, "dao", 491, "de ", 503, "deng", 506, "di", 513, "dian", 532, "diao", 548, "die", 557, "ding", 564, "diu", 573, "dong", 574, "dou", 584, "du", 591, "duan", 606, "dui", 612, "dun ", 616, "duo", 625, "e", 637, "en", 650, "er", 651, "fa", 659, "fan", 667, "fang ", 684, "fei", 695, "fen", 707, "feng", 722, "fo", 737, "fou", 738, "fu", 739, "ga", 784, "gai", 786, "gan", 792, "gang", 803, "gao", 812, "ge", 822, "gei ", 839, "gen", 840, "geng", 842, "gong", 849, "gou", 864, "gu", 873, "gua", 891, "guai", 897, "guan", 900, "guang", 911, "gui", 914, "gun", 930, "guo", 933, "ha ", 939, "hai", 940, "han", 947, "hang", 966, "hao", 969, "he", 978, "hei", 996, "proportion", 998, "heng", 1002, "hong", 1007, "hou", 1016, "hu", 1023, "hua", 1041, "huai ", 1 050, "huan", 1055, "huang", 1069, "hui", 1083, "hun", 1104, "huo", 1110, "ji", 1120, "jia", 1173, "jian", 1190, "jiang", 1230, "jiao", 1243, "jie", 1271, "jin", 1298, "jing ", 1318, "jiong", 1343, "jiu", 1345, "ju", 1362, "juan", 1387, "jue", 1394, "jun", 1404, "ka", 1415, "kai", 1419, "kan", 1424, "kang", 1430, "kao", 1437, "ke", 1441, "ken ", 1456, "keng", 1460, "kong", 1462, "kou", 1466, "ku", 1470, "kua", 1477, "kuai", 1482, "kuan", 1486, "kuang", 1488, "kui", 149 6, "kun", 1507, "kuo", 1511, "la", 1515, "lai", 1522, "lan", 1525, "lang", 1540, "lao", 1547, "le", 1556, "lei", 1558, "leng", 1569, "li", 1572, "lia", 1606, "lian ", 1607, "liang", 1621, "liao", 1632, "lie", 1645, "lin", 1650, "ling", 1662, "liu", 1676, "long", 1687, "lou", 1696, "lu", 1702, "lv", 1722, "luan", 1736, "lue", 1742, "lun ", 1744, "luo", 1751, "ma", 1763, "mai", 1772, "man", 1778, "mang", 1787, "mao", 1793, "me", 1805, "mei", 1806, "men", 1822, "meng", 182 5, "mi", 1833, "mian", 1847, "miao", 1856, "mie", 1864, "min", 1866, "ming", 1872, "miu", 1878, "mo", 1879, "mou", 1896, "mu", 1899, "na", 1914, "nai", 1921, "nan ", 1926, "nang", 1929, "nao", 1930, "ne", 1935, "nei", 1936, "nen", 1938, "neng", 1939, "ni", 1940, "nian", 1951, "niang", 1958, "niao", 1960, "nie", 1962, "nin", 1969, "ning ", 1970, "niu", 1976, "nong", 1980, "nu", 1984, "nv", 1987, "nuan", 1988, "nue", 1989, "nuo", 1991, "o", 1995, "ou", 1996, "pa", 2003, "p Ai ", 2009," pan ", 2015," pang ", 2023," pao ", 2028," pei ", 2035," pen ", 2044," peng ", 2046, "pi", 2060, "pian", 2077, "piao", 2081, "pie", 2085, "pin", 2087, "ping", 2092, "po", 2101, "pu", 2110, "qi", 2125, "qia", 2161, "qian", 2164, "qiang", 2186, "qiao ", 2194, "qie", 2209, "qin", 2214, "qing", 2225, "qiong", 2238, "qiu", 2240, "qu", 2248, "quan", 2261, "que", 2272, "qun", 2280, "ran", 2282, "rang", 2286, "rao", 2291, "re ", 2294, "ren", 2296, "reng", 2306, "ri", 230 8, "rong", 2309, "rou", 2319, "ru", 2322, "ruan", 2332, "rui", 2334, "run", 2337, "ruo", 2339, "sa", 2341, "sai", 2344, "san", 2348, "sang", 2352, "sao", 2355, "se ", 2359, "sen", 2362, "seng", 2363, "sha", 2364, "shai", 2373, "shan", 2375, "shang", 2391, "shao", 2399, "she", 2410, "shen", 2422, "sheng", 2438, "shi", 2449, "shou", 2496, "shu ", 2506, "shua", 2539, "shuai", 2541, "shuan", 2545, "shuang", 2547, "shui", 2550, "shun", 2554, "shuo", 2558, "si", 2562, "son G ", 2578," sou ", 2586," su ", 2589," suan ", 2602," sui ", 2605," sun ", 2616," suo ", 2619, "ta", 2627, "tai", 2636, "tan", 2645, "tang", 2663, "tao", 2676, "te", 2687, "teng", 2688, "ti", 2692, "tian", 2707, "tiao", 2715, "tie", 2720, "ting", 2723, "tong ", 2733, "tou", 2746, "tu", 2750, "tuan", 2761, "tui", 2763, "tun", 2769, "tuo", 2772, "wa", 2783, "wai", 2790, "wan", 2792, "wang", 2809, "wei", 2819, "wen", 2852, "weng ", 2862, "wo", 2865, "wu", 2874, "xi", 2903, "xia ", 2938, "xian", 2951, "xiang", 2977, "xiao", 2997, "xie", 3015, "xin", 3036, "xing", 3046, "xiong", 3061, "xiu", 3068, "xu", 3077, "xuan", 3096, "xue", 3106, "xun", 3112, "ya ", 3126, "yan", 3142, "yang", 3175, "yao", 3192, "ye", 3207, "yi", 3222, "yin", 3275, "ying", 3291, "yo", 3309, "yong", 3310, "you", 3325, "yu", 3346, "yuan", 3390, "yue ", 3410, "yun", 3420, "za", 3432, "zai", 3435, "zan", 3442, "zang", 3446, "zao", 3449, "ze", 3463, "zei", 3467, "zen", 3468, "zeng ", 3469," zha ", 3473," zhai ", 3487," zhan ", 3493," zhang ", 3510," zhao ", 3525," zhe ", 3535, "zhen", 3545, "zheng", 3561, "zhi", 3576, "zhong", 3619, "zhou", 3630, "zhu", 3644, "zhua ", 3670, "zhuai", 3672, "zhuan", 3673, "zhuang", 3679, "zhui", 3686, "zhun", 3692, "zhuo", 3694, "zi", 3705, "zong", 3720, "zou", 3727, "zu", 3731, "zuan", 3739, "zui", 3741, "zun ", 3745, "zuo", 3747]; function UrlEncode (str) {/********** qiushuiwuhen () *********/var I, c, p, q, ret = "", strSpecial = "! \ "# $ % & '() * +,/:; <=>? @ [\] ^ '{| }~ % "; For (I = 0; I <str. length; I ++) {if (str. charCodeAt (I)> = 0x4e00) {var p = strGB. indexOf (str. charAt (I); if (p> = 0) {q = p % 94; p = (p-q)/94; ret + = ("%" + (0xB0 + p ). toString (16) + "%" + (0xA1 + q ). toString (16 )). toUpperCase () ;}} else {c = str. charAt (I); if (c = "") ret + = "+"; else if (strSpecial. indexOf (c )! =-1) ret + = "%" + str. charCodeAt (I ). toString (16); else ret + = c ;}} return ret;} function getSpell (str, sp) {/********* qiushuiwuhen) * ******/var I, c, t, p, ret = ""; if (sp = null) sp = ""; for (I = 0; I <str. length; I ++) {if (str. charCodeAt (I)> = 0x4e00) {p = strGB. indexOf (str. charAt (I); if (p>-1 & p <3755) {for (t = qswhSpell. length-1; t> 0; t = t-2) if (qswhSpell [t] <= p) break; if (t> 0) ret + = qswhSpell [T-1] + sp ;}} return re T. substr (0, ret. length-sp.length);} "script" can only achieve part of the Chinese <input value = "Autumn without hate <>\#%{}| ^ ~ [] '&? + Abc "name = source> <input type = button value = show onclick = trans ()> <p id = result> </p> <input name = demo size = 30 value = "practical, programming, technology, practice, proficient, tutorial "> <input type = button onclick = sort (demo. value) value = sort> <script language = javascript> function trans () {result. innerHTML = "result:" result. innerHTML + = 'urlencode (source. value): '+ UrlEncode (source. value) result. innerHTML + = 'getspell (source. value): '+ getSpell (source. value) resul T. innerHTML + = 'getspell (source. value, "\ '"):' + getSpell (source. value, "'")} function spellSort (a, B) {var p = strGB. indexOf (. substr (0, 1) var q = strGB. indexOf (B. substr (0, 1) document. write (p, "-", q, "=", p-q, ""); return p-q;} function spellSort (a, B) {/********** (qiushuiwuhen 2002-9-17) ************/var I, p, q, l = strGB. length; p = 0; for (I =. length; I> 0; I --) p = p/l + strGB. indexOf (. substr (I-1, 1) q = 0; for (I = B. lengt H; I> 0; I --) q = q/l + strGB. indexOf (B. substr (I-1, 1) return p-q;} function sort (str) {var arr = str. split (","), arr2 = []; arr. sort (spellSort); alert (arr)} enter the abbreviation of the name in script, as shown in Figure zsh <select name = "username" onkeydown = spellList () onchange = alert (this [selectedIndex]. sp)> <option value = "1"> Zhang San </option> <option value = "2"> Zhang sanhuo </option> <option value = "3"> Li Si </option> <option value = "4"> Li sishui </option> </select> s Callback var sel = "", timer = null; function spellList () {/******** (qiushuiwuhen 2002-9-20) * **********/with (window. event) {with (srcElement) {if (keyCode <48) return; if (keyCode> 95) keyCode-= 48 sel + = String. fromCharCode (keyCode) window. status = sel for (I = 0; I <length; I ++) {if (! Options [I]. sp) {var tmp = "", arr = getSpell (options [I]. text ,"'"). split ("'") for (var j = 0; j
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.