失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > TOOLFK工具-汉字/字母/人民币/简繁体转换工具

TOOLFK工具-汉字/字母/人民币/简繁体转换工具

时间:2023-05-16 18:13:28

相关推荐

TOOLFK工具-汉字/字母/人民币/简繁体转换工具

本文要推荐的[TOOLFK]在线汉字/字母/人民币/简繁体转换工具,提供简繁体在线转换、人民币大写转换、字母大小写互转、汉字转拼音在线日常使用工具。

網站名稱:ToolFk

網站鏈結:/

工具链接:/tool-online-convert

代码教學

本工具[在线汉字/字母/人民币/简繁体转换工具]依赖的代码库为(可查看TOOLFK网站源码进行查看)

/togglecasetransverter.js / pinyin_dict_withtone.js / pinyin_dict_polyph / rmb.js / ec-do.js

STEP 1 在线汉字转拼音工具

STEP 2 在线简繁体在线转换工具

STEP 3 在线人民币大写转换工具

STEP4 在线字母大小写互转工具

STEP5

在线转换工具核心代码如下

#大小写互换function toggles(type){var value = togglecase_s.getValue();if(value==''){return layer.msg(NOT_EMPTY);}var result = '';if(type == 1){result = ecDo.toggleCase(value);}else if(type==2){result = ecDo.firstWordUpper(value);}else{result = ecDo.firstWordLower(value);}togglecase_t.setValue(result);}#转RMB$('.btn_fun_rmb').click(function (e) {e.preventDefault();var value = rmb_s.getValue();console.log("value = =="+value);if(value==''){return layer.msg(NOT_EMPTY);}rmb_t.setValue(trans(value));});#简繁互换function trans(_type){var value = trans_s.getValue();if(value==''){return layer.msg(NOT_EMPTY);}trans_t.setValue(transverter({type:_type,str:value}));}#获取汉字拼音function getPinyin(){var type = parseInt($('input[name="pinyin_option"]:checked').val());var isStartDuoyin = $('input[name="start_duoyin"]:checked').val() ? true : false;var text = $.trim(pinyin_s.getValue());if(text == ''){layer.msg(NOT_EMPTY);return;}var result = '';switch (type){case 0:result = pinyinUtil.getPinyin(text, ' ', true, isStartDuoyin);break;case 1:result = pinyinUtil.getPinyin(text, ' ', false, isStartDuoyin);break;case 2:result = pinyinUtil.getFirstLetter(text, isStartDuoyin);break;}var html = result;if(result instanceof Array){html = '';result.forEach(function(val,i){if(i >= 10)return;html += val + "\n\n";});}pinyin_t.setValue(html);}

如果觉得《TOOLFK工具-汉字/字母/人民币/简繁体转换工具》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。