Special effects for converting Chinese characters to PinYin Based on jQuery. Hz2Py. js plug-in

Source: Internet
Author: User

Special effects for converting Chinese characters to PinYin Based on jQuery. Hz2Py. js plug-in

JQuery. hz2Py. the conversion of Chinese characters to PinYin implemented by the js plug-in is a very practical online Conversion Function. This plug-in has packaged Chinese characters into a plug-in library, and the call time is very simple, only one method can be called for conversion.

You can implement conversion of Chinese characters into pinyin code based on jQuery. This is a special Chinese character-to-pinyin Effect Based on the jQuery. Hz2Py. js plug-in. The plug-in is automatically downloaded. Use the following method (modify the jq import path ).

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

<Html>

<Title> converting Chinese characters into pinyin codes based on jQuery </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 {

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>

Enter the Chinese character <textarea id = "content"> </textarea> <textarea id = "show"> </textarea>

</Center> </body>

The above is all the content of this article. I hope you will like it.

 

Note <>: For more exciting tutorials, please pay attention to the help house programming

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.