跳至主要內容

TOOLFK Tool-Online Chinese / Letter / RMB / Simplified and Traditional Conversion Tool

The [TOOLFK] online Chinese character / letter / RMB / Simplified and Traditional Chinese conversion tool to be recommended in this article provides online daily use tools for Simplified and Traditional Chinese online conversion, RMB capitalization conversion, letter case conversion, and Chinese to Pinyin conversion.

Code teaching

This tool [online Chinese character / letter / RMB / Simplified and Traditional Chinese conversion tool] depends on the code base (you can view the TOOLFK website source code to view)
http://www.toollibs.com/togglecase
transverter.js / pinyin_dict_withtone.js / pinyin_dict_polyph / rmb.js / ec-do.js

STEP 1 Online Chinese to Pinyin tool

STEP 2 Online Simplified and Traditional Online Conversion Tool
STEP 3 Online RMB capital conversion tool
STEP4 online letter case conversion tool
STEP5
The core code of the online conversion tool is as follows
#大小写互换
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);
    }


留言

此網誌的熱門文章

How to Download tencent video online for free? tencent Video Downloader -VideoFK

In line to see some friends in the query how to download tencent video on the computer, and this article will be introduced "  Videofk.com  " is a free tencent video online video download site, download method is very simple, just copy the video link, paste it into the query box, click on the search button, then you can quickly save mp4 videos to your PC or mobile phone. Visit website link:  https://www.videofk.com/weishi-video-download Tutorial STEP 1 Open   Videofk   website, you need to download the tencent video link to copy and paste it into the bottom, click on the search button below to obtain cover art and movie download button. STEP 2 In  Videofk  After parsing the video?, Are the following methods for you to download? Choose. 1, click on the top cover map of the "  Download  " button to quickly download videos to the local. 2, click on the cover drawing any position, a window will pop up, w...

TOOLFK tool-online QR code decoding tool

This article recommends [TOOLFK] online QR code decoding,  online QR code decoder  , you can get the  QR code  by dragging or uploading the QR code picture, computer camera scanning the QR code, entering the QR code picture address, etc. Content. Website name: ToolFk website link:  https://www.toolfk.com/Tool link:  https://www.toolfk.com/tool-generate-qrcode?t=qrdecode Code teaching The code base that this tool [online QR code decoding tool] depends on is  https://github.com/davidshimjs/qrcodejs STEP 1 STEP 2 The core code is as follows function renderLogo ( canvas, url ) { var img = new Image(), ctx = canvas.getContext( '2d' ), canvasSize = 200 ; if (!url) { ctx.fillStyle = 'rgb(255, 255, 255)' ; ctx.fillRect( 0 , 0 , canvasSize, canvasSize); return ; } img.onload = function ( ) { var imgSize, zoom, imgW = img.width, imgH = img.height; ...

How to Download Mega videos online for free? Mega Video Downloader — VideoFk

In line to see some friends in the query how to download Mega videos on your computer, and this article will be introduced "  Videofk.com  " Mega is a free online video download site, download method is very simple, just copy the video link, paste it into query box, click on the search button, then you can quickly save mp4 videos to your PC or mobile phone. Visit website link:  https://www.videofk.com/mega-video-download Tutorial STEP 1 Open   Videofk   website, the link to download the video Mega copy and paste it into the bottom, click on the search button below to obtain cover art and movie download button. STEP 2 In  Videofk  After parsing the video?, Are the following methods for you to download? Choose. 1, click on the top cover map of the "  Download  " button to quickly download videos to the local. 2, click on the cover drawing any position, a window will pop up, wait a look at the video buffer, the v...