function calculate() { var select1 = document.currcalc.from_tkc; var select2 = document.currcalc.to_tkc; var select1_text = select1[select1.selectedIndex].text; var select2_text = select2[select2.selectedIndex].text; var fromval; //Value of the currency to be converted var toval; //Value of the currency to convert into //These error messages are hidden values in the HTML page //They get translated into foreign languages var errmsg1 = document.currcalc.translation1.value; var errmsg2 = document.currcalc.translation2.value; var errmsg3 = document.currcalc.translation3.value; //calculate the fixed Euro value if (select1_text.match(/\(EUR\)/) != null) { var temp = select2_text.split("("); var lastsplit = temp.length - 1; var result = temp[lastsplit].match(/(FRF|ATS|PTE|ESP|BEF|NLG|FIM|DEM|IEP|ITL|LUF|GRD)/); if (result != null) { fromval = 1; toval = eurovals[result[0]]; } } //calculate the fixed Euro value if (select2_text.match(/\(EUR\)/) != null) { var tmp = select1_text.split("("); var lstsplit = tmp.length - 1; var result = tmp[lstsplit].match(/(FRF|ATS|PTE|ESP|BEF|NLG|FIM|DEM|IEP|ITL|LUF|GRD)/); if (result != null) { toval = 1; fromval = eurovals[result[0]]; } } //set the prices if (fromval == null && toval == null) { fromval = price[select1[select1.selectedIndex].value]; toval = price[select2[select2.selectedIndex].value]; } //check to make sure that there is a valid price/ valid currency for each if ((fromval < 0) || (fromval == "") || isNaN(fromval) || (toval < 0) || (toval == "") || isNaN(toval)){ alert(errmsg1); return false; } //assign the amount and check that it is valid, remove any punctuation //amount is the number of the base currency units specified by the user var amount = document.currcalc.amount.value; if ((amount == "") || isNaN(amount) || (amount == 0) || (amount < 1)){ alert(errmsg2); document.currcalc.amount.focus(); return false; } var pattern = /,/g; amount = amount.replace(pattern, ""); //show all results ShowResult(fromval, toval, amount); } //window.onload = calculate;
英国普利茅斯华人社区

Plymouth Chinese 当前在线人数:   轉換為繁體中文

英国普利茅斯当地时间:

当前位置:英国普利茅斯华人社区首页 >> 常用工具首页 >> 即时汇率兑换
即时汇率兑换
兑换数量:


loadResults(); calculate();



[即时汇率兑换是和银行系统连接查询的当前汇率]

英国普利茅斯华人社区 (Plymouth Chinese) 是在英国注册的非盈利性组织网站,注册号:SC375780

网站服务资质:英国大学和学院招生服务中心(UCAS)编号:68847     英国签证移民署(OISC)编号:F201300767

Plymouth Chinese © 2006 - 2017. All rights reserved.     网站已经正常运行 2706 天 (已超过 7 年)    关于英国普利茅斯华人社区     意见反馈

   

本站部分信息由互联网收集而来,版权归原创者所有,如果侵犯了你的权益,请通知我们,我们会及时删除侵权内容。  免责申明