一个简单可配置的JavaScript库,多语种在线货币转换器,使得用户能够快速地将资金转换成另一种货币。基础调用方式currencyConverter("#example");默认值currencyConverter("#example",{ baseAmount: 10 });指定汇率currencyConverter("#example",{ currencyData: { AUD: 1.6376, BGN: 1.9558, BRL: 6.0777 } });基础配置currencyConverter("#example",{ fromCurrency: 'USD', toCurrency: 'AUD' })确定小数,默认4currencyConverter("#example",{ precision: 2 });转换后回调方法currencyConverter("#example",{ onChange: (data) => console.log(data) });重写样式currencyConverter("#example",{ wrapperClass: null, inputFromAmountClass: null, inputFromCurrencyClass: null, inputToAmountClass: null, inputToCurrencyClass: null, });
preview Points Download 6毛Download Share Download
未经允许不得转载: ICode联盟 » Plugin Special Effects » 货币转换JavaScript插件