CN108803894A - 一种基于pinying.js实现商品名的拼音简写自动生成的方法 - Google Patents
一种基于pinying.js实现商品名的拼音简写自动生成的方法 Download PDFInfo
- Publication number
- CN108803894A CN108803894A CN201810589282.1A CN201810589282A CN108803894A CN 108803894 A CN108803894 A CN 108803894A CN 201810589282 A CN201810589282 A CN 201810589282A CN 108803894 A CN108803894 A CN 108803894A
- Authority
- CN
- China
- Prior art keywords
- phonetic
- pinying
- trade name
- chinese character
- simplified form
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
- G06F3/0233—Character input methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Human Computer Interaction (AREA)
- Document Processing Apparatus (AREA)
Abstract
本发明涉及JavaScript技术领域,特别涉及基于pinying.js实现商品名的拼音简写自动生成的方法。本发明方法步骤是:1、引入pinying.js到页面。2、定义一个文本输入框,下拉框。3、定义query函数,根据文本框输入的商品名自动获取汉字拼音首字母。4、将索引到的值,遍历到下拉框,供用户选择。本发明解决了传统商品名拼音首字母需手动录入、操作繁琐、准确性低、效率低等问题。
Description
技术领域
本发明涉及JavaScript技术领域,特别涉及基于pinying.js实现商品名的拼音简写自动生成的方法。
背景技术
JavaScript,一种高级编程语言,通过解释执行,是一门动态类型,面向对象(基于原型)的直译语言。它已经由欧洲电脑制造商协会通过ECMAScript实现语言的标准化。它被世界上的绝大多数网站所使用,也被世界主流浏览器(Chrome、IE、FireFox等)支持。
JavaScript是一门基于原型、函数先行的语言,是一门多范式的语言,它支持面向对象编程,命令式编程,以及函数式编程。它提供语法来操控文本、数组、日期以及正则表达式等,不支持I/O,比如网络、存储和图形等,但这些都可以由它的宿主环境提供支持。
发明内容
本发明解决的技术问题在于提供基于pinying.js实现商品名的拼音简写自动生成的方法,解决了传统商品名拼音首字母需手动录入、操作繁琐、准确性低、效率低等问题。
本发明解决上述技术问题的技术方案是:
所述的方法包含以下几个步骤:
步骤一、引入pinying.js到页面;
步骤二、定义一个文本输入框,下拉框;
步骤三、定义query函数,根据文本框输入的商品名自动获取汉字拼音首字母;
步骤四、将索引到的值,遍历到下拉框,供用户选择;
本发明的有益效果:本发明基于pinying.js实现了商品名的拼音简写自动生成,操作便捷、成本低、效率高的方法。
附图说明
下面结合附图对本发明进一步说明:
图1为本发明的方法流程图。
具体实施方式
如图1所示,本发明采用如下步骤可以实现页面标题的统一维护
步骤一、引入pinying.js到页面;
<script type="text/javascript" src="${ctx }/statics/js/pinying.js"charset="GBK"></script>
步骤二、定义一个文本输入框,下拉框;
<input onKeyUp="query()" id="productName" class="col-xs-12 form-controlpinput" type="text" name="productName" value="${model.productName}"placeholder="商品名" isvalid="yes" checkexpession="NotNull">
<select id="mnemonicName" class="col-xs-12 form-control pinput" name="mnemonicName">
<option value="${model.mnemonicName}">${model.mnemonicName}</option>
</select>
步骤三、 定义query函数,根据文本框输入的商品名自动获取汉字拼音首字母;
function query(){
var str = document.getElementById("productName").value.trim();
var arrRslt = makePy(str);
…
}
步骤四、将索引到的值,遍历到下拉框,供用户选择;
var option = null;
document.getElementById("mnemonicName").innerHTML="";//清空下拉框
var first = document.getElementById("mnemonicName");
for(var j=0;j<arrRslt.length;j++){
var obj = document.getElementById("mnemonicName");
obj.add(new Option(arrRslt[j],arrRslt[j]));
}。
Claims (5)
1.基于pinying.js实现商品名的拼音简写自动生成的方法,其特征在于:所述的方法包含以下几个步骤:
步骤一、引入pinying.js到页面;
步骤二、定义一个文本输入框,下拉框;
步骤三、定义query函数,根据文本框输入的商品名自动获取汉字拼音首字母;
步骤四、将索引到的值,遍历到下拉框,供用户选择。
2.根据权利要求1所述的拼音简写自动生成方法,其特征在于:所述的步骤一中,引入pinying.js到页面。
3.根据权利要求1所述的拼音简写自动生成方法,其特征在于:所述的步骤二中,定义一个文本输入框,下拉框。
4.根据权利要求1所述的拼音简写自动生成方法,其特征在于:所述的步骤三中,定义query函数,根据文本框输入的商品名自动获取汉字拼音首字母,支持多音字。
5.根据权利要求1所述的拼音简写自动生成方法,其特征在于:所述的步骤四中,将索引到的值,遍历到下拉框,方便用户选择。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810589282.1A CN108803894A (zh) | 2018-06-08 | 2018-06-08 | 一种基于pinying.js实现商品名的拼音简写自动生成的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810589282.1A CN108803894A (zh) | 2018-06-08 | 2018-06-08 | 一种基于pinying.js实现商品名的拼音简写自动生成的方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108803894A true CN108803894A (zh) | 2018-11-13 |
Family
ID=64088986
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810589282.1A Pending CN108803894A (zh) | 2018-06-08 | 2018-06-08 | 一种基于pinying.js实现商品名的拼音简写自动生成的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108803894A (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109828973A (zh) * | 2019-01-31 | 2019-05-31 | 泰康保险集团股份有限公司 | 信息处理方法和设备 |
CN111026459A (zh) * | 2019-12-05 | 2020-04-17 | 杭州有赞科技有限公司 | 一种字符串转拼音方法 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819606A (zh) * | 2012-08-20 | 2012-12-12 | 中国农业银行股份有限公司 | 基于拼音的信息查询方法、***和服务器 |
CN103092846A (zh) * | 2011-10-27 | 2013-05-08 | 镇江雅迅软件有限责任公司 | 基于拼音首字母的商品检索方法的实现 |
CN105574118A (zh) * | 2015-12-14 | 2016-05-11 | 广州华多网络科技有限公司 | 一种输入信息的确定方法及客户端 |
CN108037837A (zh) * | 2017-11-07 | 2018-05-15 | 朗坤智慧科技股份有限公司 | 一种搜索词的智能提示方法 |
-
2018
- 2018-06-08 CN CN201810589282.1A patent/CN108803894A/zh active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092846A (zh) * | 2011-10-27 | 2013-05-08 | 镇江雅迅软件有限责任公司 | 基于拼音首字母的商品检索方法的实现 |
CN102819606A (zh) * | 2012-08-20 | 2012-12-12 | 中国农业银行股份有限公司 | 基于拼音的信息查询方法、***和服务器 |
CN105574118A (zh) * | 2015-12-14 | 2016-05-11 | 广州华多网络科技有限公司 | 一种输入信息的确定方法及客户端 |
CN108037837A (zh) * | 2017-11-07 | 2018-05-15 | 朗坤智慧科技股份有限公司 | 一种搜索词的智能提示方法 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109828973A (zh) * | 2019-01-31 | 2019-05-31 | 泰康保险集团股份有限公司 | 信息处理方法和设备 |
CN111026459A (zh) * | 2019-12-05 | 2020-04-17 | 杭州有赞科技有限公司 | 一种字符串转拼音方法 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7721195B2 (en) | RTF template and XSL/FO conversion: a new way to create computer reports | |
US7761787B2 (en) | Document generation system and user interface for producing a user desired document | |
US10008009B1 (en) | Method for generating dynamic vector graphics | |
CN105824787B (zh) | 一种html模板动态配置的控制方法及*** | |
US20090106775A1 (en) | Method, system and apparatus for a transformation engine for use in the processing of structured documents | |
US20080288239A1 (en) | Localization and internationalization of document resources | |
US20040230900A1 (en) | Declarative mechanism for defining a hierarchy of objects | |
Müller et al. | Multi-level annotation in MMAX | |
US7707496B1 (en) | Method, system, and apparatus for converting dates between calendars and languages based upon semantically labeled strings | |
CN104267949A (zh) | 表单设计器及表单设计方法 | |
Faulkner et al. | HTML 5.2 | |
US20190057074A1 (en) | Patent automation system | |
US7742048B1 (en) | Method, system, and apparatus for converting numbers based upon semantically labeled strings | |
CN108803894A (zh) | 一种基于pinying.js实现商品名的拼音简写自动生成的方法 | |
US20040205612A1 (en) | Programmatically generating a presentation style for legacy host data | |
Pohja | COMPARISON OF COMMON XML-BASED WEB USER INTERFACE LANGUAGESCOMPARISON OF COMMON XML-BASED WEB USER INTERFACE LANGUAGES | |
KR101292982B1 (ko) | Clr 객체의 계층 구조 결정 방법, 컴퓨터 판독가능 매체, 객체를 선언적으로 정의하는 방법, clr 객체의 계층 구조 결정 메카니즘, 및 clr 객체를 선언적으로 정의하는 장치 | |
CN115328455A (zh) | flutter应用的信息显示方法、装置、设备及介质 | |
CN117971190B (zh) | 基于大语言模型的页面自动化操作生成方法及相关装置 | |
US11210454B2 (en) | Method for preparing documents written in markup languages while implementing a user interface for dealing with data of an information system | |
CN111597205B (zh) | 模板配置方法、信息提取方法、装置以及电子设备、介质 | |
Wei et al. | Research on software reuse of user interface for mobile computing devices based on XML | |
Browning et al. | Working with Text | |
Sutherland et al. | Chapter 3: Working with Text | |
Bordawekar et al. | XJ: robust XML processing in Java™ |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181113 |