Development testing, often need to fill in the name, mobile phone number, ID card number, bank card number, both to meet the format requirements, and can not repeat. People will search the internet for all kinds of generators. Can you write a simple generator of your own? The following is a randomly generated name, mobile phone number, ID card number, bank card number of the JS code.
Generate Random name function GetName () {var familynames = new Array ("Zhao", "Money", "Sun", "Li", "Zhou", "WU", "Zheng", "Wang", "Feng", "Chen", "Chu", "Wei", "Jiang", "Shen", "Han", "Yang", "Zhu", "Qin", "especially", "Xu", "Ho", "Lu", "Shi", "Zhang", "Kong", "Cao", "Yan", "Hua", "Jin", "Wei", "Tao", "Ginger", "qi", "Xie", "Zou", "Yu", "Bai", "Shui", "Dou", "Zhang", "Yun", "su", "Pan", "ge "," Xi, "" Van "," Peng "," Lang "," Lu "," Wei "," Chang "," Horse "," Miao "," Feng "," Hua "," Fang "," Yu "," Ren "," Yuan "," Liu "," Feng ",
"Bao", "History", "Tang", "fee", "" Lian "," cen "," Xue "," Lei "," he "," ni "," Tang "," Teng "," Yin "," Luo "," bi "," Hao "," WU "," Ann "," Chang ", "Le", "in", "when", "Fu", "" Skin "," Bian "," Qi "," Kang "," WU "," Yu "," Yuan "," bu "," gu "," Meng "," ping "," Huang "," and "," Mu "
, "Xiao", "Yin"); var givennames = new Array ("Zi Xuan", "Miao", "Guo Dong", "Teacher", "Reidon", "Sweet", "min", "Still", "Guo Yin", "Hexiang", "Morning Tao", "Hao Xuan", "Yi Xuan", "Yi Chen
"," Yi Fan "," Yi Ran "," Jin Chun "," Jin Kun "," Chun Qi "," Yang "," Wen Hao "," Dongdong "," Male Lin "," Hao Morning "," Hee-han "," Rongrong "," Ice Maple "," Yan Xin "," Hao "," Hin Hui "," building a government ", "Mei Xin", "Accomplishment Hui", "he Attributes", "Wen Jie", "Xin Source", "Zhong Lin", "Banyan Run", "Xin ru", "Hui Jia", "new", "Jian Lin", "also Phenanthrene", "Lin", "Ice Jie", "Jia Xin", "Han Han", "Yu Chen", "Chummi", "Ze Hui "," Wai Yang "," Han Yue "," Embellish Li "," Xiang "," Shuhua "," Crystal "," Lingjing "," Yara Creek "," Rain Culvert "," Jia Yi "," Jia Yi "," Zi Chen "," Jia Qi "," Purple Xuan "," Rui Chen "," Xin Rui "," Meng ", "Mingyuan", "Hin Yi", "Ze Far", "Hin Yi", "Jia Yi", "Jia Hui", "Morning XI," Morning Lu "," Yun Hao "," Ru Xin "," Shu Jun "," Crystal 滢 "," embellish "," Ficus "," Jia Yu "," Jia Jade "," Xiao Qing "," a
Ming "," "Language Morning", "Tim Chi", "Tim Hao", "Rain Ze", "Ya 晗", "Ya Han", "" Qing Yan "," Poem Yue "," Jia le "," Chen Han "," Tian-ji "," Yue Ao "," Jia Hao "," Days Hao "," Meng Meng "," if Meng ");
var i = parseint (Math.random ()) *10 + parseint (Math.random ());
var familyname = familynames[i];
var j = parseint (Math.random ()) *10 + parseint (Math.random ());
var givenname = givennames[i];
var name = familyname + givenname;
var x = document.getelementsbyname ("Client_name");
for (var i = 0; i < x.length i++) {var o = x[i];
O.value = name; }
}
Above this JS randomly generated name, mobile phone number, ID card number, bank card number "Implementation Code" is a small series to share all the content, hope to give you a reference, but also hope that we support the cloud habitat community.