Skip to content

Lorem ipsum generator for Chinese language in Javascript. 中文版乱数假文生成器,Javascript实现。

Notifications You must be signed in to change notification settings

webzhao/lorem-cn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

lorem-cn: A ramdom Chinese characters generator

Lorem ipsum generator for Chinese language in Javascript. See the demo

中文版乱数假文生成器,Javascript实现。查看Demo

Usage 使用方法

Include lorem-cn.js in your HTML file which is UTF-8 encoded. 在HTML中引入 lorem-cn.js 文件。为避免乱码问题,请使用UTF-8编码。

<meta charset="UTF-8">
<script src="path/to/lorem-cn.js"></script>

Use lorem function with the length of text you wish to genrate as parameter. 使用lorem方法生成随即文本,第一个参数为文本长度。

lorem(100); //return 100 random chinese characters
lorem(75); //return 75 random chinese characters

If you don't want punctuations in the generated text, set usePunc to false. 如果你不想让生成的文本包含标点符号,在选项中设置 usePuncfalse

lorem(20, {usePunc: false}); //20 characters without punctuations

About

Lorem ipsum generator for Chinese language in Javascript. 中文版乱数假文生成器,Javascript实现。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published