国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > JavaScript > 正文

javascript實(shí)現(xiàn)根據(jù)漢字獲取簡(jiǎn)拼

2019-11-20 08:53:17
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

主要用于模糊查詢(xún),或者快速查找

代碼如下

<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame Remove this if you use the .htaccess --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>漢字簡(jiǎn)拼</title> <meta name="description" content=""> <meta name="author" content="Administrator"> <meta name="viewport" content="width=device-width; initial-scale=1.0"> <!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references --> <link rel="shortcut icon" href="/favicon.ico"> <link rel="apple-touch-icon" href="/apple-touch-icon.png"> </head> <body> <center>  <input type="text" id="wordC" />  <input type="button" id="btn" value="獲取簡(jiǎn)拼" />  <h1 id="wordE">  </h1> </center> </body>  <script type="text/javascript"> window.onload = function() {    document.getElementById("btn").onclick = function() {  var wordC = document.getElementById("wordC").value;  var wordE = letterArr(wordC);  document.getElementById("wordE").innerHTML = wordE.toUpperCase();  };  //獲取字符串首字母  /**  * arrInitialChart數(shù)組將unicode 19968-40869 編碼分為26個(gè)元素,每個(gè)元素的首字母都相同,按英文字符排序  * arrNumLetter數(shù)組為每個(gè)arrInitialChart數(shù)組的元素id所對(duì)應(yīng)的英文字母  * arrPolyphone數(shù)組為377個(gè)聲母不同的多音字的首字母字符串  */  var arrInitialChart = new Array();  arrInitialChart[0]="

主站蜘蛛池模板:
高州市|
青田县|
陵水|
柳河县|
华池县|
南江县|
安多县|
临沧市|
商丘市|
临泉县|
香格里拉县|
久治县|
龙里县|
闽清县|
怀安县|
清流县|
苏尼特右旗|
新化县|
石景山区|
宁城县|
永泰县|
东辽县|
翁牛特旗|
南充市|
原阳县|
延津县|
大关县|
陇西县|
鄂伦春自治旗|
休宁县|
民乐县|
德清县|
岑溪市|
永昌县|
赤城县|
绿春县|
靖安县|
舒兰市|
德昌县|
敦化市|
定边县|