$(document).ready(function(){ // 日付 var datetime = "2024年11月8日現在"; $("#hanbai-datetime").text(datetime); // 金インゴット var ingot_au = 13390; var ingot_au_300 = 13390 + 13; var ingot_au_200 = 13390 + 20; var ingot_au_100 = 13390 + 40; var ingot_au_50 = 13390 + 110; var ingot_au_20 = 13390 + 190; var ingot_au_10 = 13390 + 320; var ingot_au_5 = 13390 + 510; $("#hanbai-ingot-au-300").text(number_format(ingot_au_300)); $("#hanbai-ingot-au-200").text(number_format(ingot_au_200)); $("#hanbai-ingot-au-100").text(number_format(ingot_au_100)); $("#hanbai-ingot-au-50").text(number_format(ingot_au_50)); $("#hanbai-ingot-au-20").text(number_format(ingot_au_20)); $("#hanbai-ingot-au-10").text(number_format(ingot_au_10)); $("#hanbai-ingot-au-5").text(number_format(ingot_au_5)); // K24板材 var k24_0 = 13425; var k24_10 = 13400; var k24_100 = 13385; var k24_500 = 13375; var k24_1000 = 13370; $("#hanbai-k24-1000").text(number_format(k24_1000)); $("#hanbai-k24-500").text(number_format(k24_500)); $("#hanbai-k24-100").text(number_format(k24_100)); $("#hanbai-k24-10").text(number_format(k24_10)); $("#hanbai-k24-0").text(number_format(k24_0)); // K18棒材 var k18_0 = 10111; var k18_10 = 10086; var k18_100 = 10071; var k18_500 = 10061; var k18_1000 = 10056; $("#hanbai-k18-1000").text(number_format(k18_1000)); $("#hanbai-k18-500").text(number_format(k18_500)); $("#hanbai-k18-100").text(number_format(k18_100)); $("#hanbai-k18-10").text(number_format(k18_10)); $("#hanbai-k18-0").text(number_format(k18_0)); // K18WG棒材 // Pd3.7% var k18wg_1_0 = 10313; var k18wg_1_10 = 10288; var k18wg_1_100 = 10273; var k18wg_1_500 = 10263; var k18wg_1_1000 = 10258; $("#hanbai-k18wg-1-1000").text(number_format(k18wg_1_1000)); $("#hanbai-k18wg-1-500").text(number_format(k18wg_1_500)); $("#hanbai-k18wg-1-100").text(number_format(k18wg_1_100)); $("#hanbai-k18wg-1-10").text(number_format(k18wg_1_10)); $("#hanbai-k18wg-1-0").text(number_format(k18wg_1_0)); // Pd10% var k18wg_2_0 = 10629; var k18wg_2_10 = 10604; var k18wg_2_100 = 10589; var k18wg_2_500 = 10579; var k18wg_2_1000 = 10574; $("#hanbai-k18wg-2-1000").text(number_format(k18wg_2_1000)); $("#hanbai-k18wg-2-500").text(number_format(k18wg_2_500)); $("#hanbai-k18wg-2-100").text(number_format(k18wg_2_100)); $("#hanbai-k18wg-2-10").text(number_format(k18wg_2_10)); $("#hanbai-k18wg-2-0").text(number_format(k18wg_2_0)); // Pd12.5% var k18wg_3_0 = 10755; var k18wg_3_10 = 10730; var k18wg_3_100 = 10715; var k18wg_3_500 = 10705; var k18wg_3_1000 = 10700; $("#hanbai-k18wg-3-1000").text(number_format(k18wg_3_1000)); $("#hanbai-k18wg-3-500").text(number_format(k18wg_3_500)); $("#hanbai-k18wg-3-100").text(number_format(k18wg_3_100)); $("#hanbai-k18wg-3-10").text(number_format(k18wg_3_10)); $("#hanbai-k18wg-3-0").text(number_format(k18wg_3_0)); // Ni var k18wg_4_0 = 10111; var k18wg_4_10 = 10086; var k18wg_4_100 = 10071; var k18wg_4_500 = 10061; var k18wg_4_1000 = 10056; $("#hanbai-k18wg-4-1000").text(number_format(k18wg_4_1000)); $("#hanbai-k18wg-4-500").text(number_format(k18wg_4_500)); $("#hanbai-k18wg-4-100").text(number_format(k18wg_4_100)); $("#hanbai-k18wg-4-10").text(number_format(k18wg_4_10)); $("#hanbai-k18wg-4-0").text(number_format(k18wg_4_0)); // プラチナインゴット var ingot_pt = 4989; var ingot_pt_100 = 4989 + 50; var ingot_pt_50 = 4989 + 80; var ingot_pt_20 = 4989 + 100; var ingot_pt_10 = 4989 + 200; var ingot_pt_5 = 4989 + 300; $("#hanbai-ingot-pt-100").text(number_format(ingot_pt_100)); $("#hanbai-ingot-pt-50").text(number_format(ingot_pt_50)); $("#hanbai-ingot-pt-20").text(number_format(ingot_pt_20)); $("#hanbai-ingot-pt-10").text(number_format(ingot_pt_10)); $("#hanbai-ingot-pt-5").text(number_format(ingot_pt_5)); // Pt1000板材 var pt1000_0 = 5080; var pt1000_10 = 5055; var pt1000_100 = 5040; var pt1000_500 = 5030; var pt1000_1000 = 5025; $("#hanbai-pt1000-1000").text(number_format(pt1000_1000)); $("#hanbai-pt1000-500").text(number_format(pt1000_500)); $("#hanbai-pt1000-100").text(number_format(pt1000_100)); $("#hanbai-pt1000-10").text(number_format(pt1000_10)); $("#hanbai-pt1000-0").text(number_format(pt1000_0)); // Pt950棒材 // Pd var pt950_1_0 = 5105; var pt950_1_10 = 5080; var pt950_1_100 = 5065; var pt950_1_500 = 5055; var pt950_1_1000 = 5050; $("#hanbai-pt950-1-1000").text(number_format(pt950_1_1000)); $("#hanbai-pt950-1-500").text(number_format(pt950_1_500)); $("#hanbai-pt950-1-100").text(number_format(pt950_1_100)); $("#hanbai-pt950-1-10").text(number_format(pt950_1_10)); $("#hanbai-pt950-1-0").text(number_format(pt950_1_0)); // Ru2% var pt950_2_0 = 5090; var pt950_2_10 = 5065; var pt950_2_100 = 5050; var pt950_2_500 = 5040; var pt950_2_1000 = 5035; $("#hanbai-pt950-2-1000").text(number_format(pt950_2_1000)); $("#hanbai-pt950-2-500").text(number_format(pt950_2_500)); $("#hanbai-pt950-2-100").text(number_format(pt950_2_100)); $("#hanbai-pt950-2-10").text(number_format(pt950_2_10)); $("#hanbai-pt950-2-0").text(number_format(pt950_2_0)); // Ru3% var pt950_3_0 = 5085; var pt950_3_10 = 5060; var pt950_3_100 = 5045; var pt950_3_500 = 5035; var pt950_3_1000 = 5030; $("#hanbai-pt950-3-1000").text(number_format(pt950_3_1000)); $("#hanbai-pt950-3-500").text(number_format(pt950_3_500)); $("#hanbai-pt950-3-100").text(number_format(pt950_3_100)); $("#hanbai-pt950-3-10").text(number_format(pt950_3_10)); $("#hanbai-pt950-3-0").text(number_format(pt950_3_0)); // Pt900棒材 // Pd10% var pt900_1_0 = 5110; var pt900_1_10 = 5085; var pt900_1_100 = 5070; var pt900_1_500 = 5060; var pt900_1_1000 = 5055; $("#hanbai-pt900-1-1000").text(number_format(pt900_1_1000)); $("#hanbai-pt900-1-500").text(number_format(pt900_1_500)); $("#hanbai-pt900-1-100").text(number_format(pt900_1_100)); $("#hanbai-pt900-1-10").text(number_format(pt900_1_10)); $("#hanbai-pt900-1-0").text(number_format(pt900_1_0)); // Ru1.5% var pt900_2_0 = 5100; var pt900_2_10 = 5075; var pt900_2_100 = 5060; var pt900_2_500 = 5050; var pt900_2_1000 = 5045; $("#hanbai-pt900-2-1000").text(number_format(pt900_2_1000)); $("#hanbai-pt900-2-500").text(number_format(pt900_2_500)); $("#hanbai-pt900-2-100").text(number_format(pt900_2_100)); $("#hanbai-pt900-2-10").text(number_format(pt900_2_10)); $("#hanbai-pt900-2-0").text(number_format(pt900_2_0)); // Ru2% var pt900_3_0 = 5095; var pt900_3_10 = 5070; var pt900_3_100 = 5055; var pt900_3_500 = 5045; var pt900_3_1000 = 5040; $("#hanbai-pt900-3-1000").text(number_format(pt900_3_1000)); $("#hanbai-pt900-3-500").text(number_format(pt900_3_500)); $("#hanbai-pt900-3-100").text(number_format(pt900_3_100)); $("#hanbai-pt900-3-10").text(number_format(pt900_3_10)); $("#hanbai-pt900-3-0").text(number_format(pt900_3_0)); // Ru3% var pt900_4_0 = 5090; var pt900_4_10 = 5065; var pt900_4_100 = 5050; var pt900_4_500 = 5040; var pt900_4_1000 = 5035; $("#hanbai-pt900-4-1000").text(number_format(pt900_4_1000)); $("#hanbai-pt900-4-500").text(number_format(pt900_4_500)); $("#hanbai-pt900-4-100").text(number_format(pt900_4_100)); $("#hanbai-pt900-4-10").text(number_format(pt900_4_10)); $("#hanbai-pt900-4-0").text(number_format(pt900_4_0)); // Pd1000板材 var pd1000_0 = 5175; var pd1000_10 = 5150; var pd1000_100 = 5135; var pd1000_500 = 5125; var pd1000_1000 = 5120; $("#hanbai-pd1000-1000").text(number_format(pd1000_1000)); $("#hanbai-pd1000-500").text(number_format(pd1000_500)); $("#hanbai-pd1000-100").text(number_format(pd1000_100)); $("#hanbai-pd1000-10").text(number_format(pd1000_10)); $("#hanbai-pd1000-0").text(number_format(pd1000_0)); // Ag1000笹吹 var ag1000_0 = 165.3; var ag1000_10 = 162.3; var ag1000_100 = 161.3; var ag1000_500 = 160.3; var ag1000_1000 = 159.8; $("#hanbai-ag1000-1000").text(number_format(ag1000_1000, 2)); $("#hanbai-ag1000-500").text(number_format(ag1000_500, 2)); $("#hanbai-ag1000-100").text(number_format(ag1000_100, 2)); $("#hanbai-ag1000-10").text(number_format(ag1000_10, 2)); $("#hanbai-ag1000-0").text(number_format(ag1000_0, 2)); // Ag925棒材 var ag925_0 = 164.3; var ag925_10 = 161.3; var ag925_100 = 160.3; var ag925_500 = 159.3; var ag925_1000 = 158.8; $("#hanbai-ag925-1000").text(number_format(ag925_1000, 2)); $("#hanbai-ag925-500").text(number_format(ag925_500, 2)); $("#hanbai-ag925-100").text(number_format(ag925_100, 2)); $("#hanbai-ag925-10").text(number_format(ag925_10, 2)); $("#hanbai-ag925-0").text(number_format(ag925_0, 2)); }); function number_format (number, decimals, decPoint, thousandsSep) { number = (number + '').replace(/[^0-9+\-Ee.]/g, '') var n = !isFinite(+number) ? 0 : +number var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals) var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep var dec = (typeof decPoint === 'undefined') ? '.' : decPoint var s = '' var toFixedFix = function (n, prec) { var k = Math.pow(10, prec) return '' + (Math.round(n * k) / k) .toFixed(prec) } // @todo: for IE parseFloat(0.55).toFixed(0) = 0; s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.') if (s[0].length > 3) { s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep) } if ((s[1] || '').length < prec) { s[1] = s[1] || '' s[1] += new Array(prec - s[1].length + 1).join('0') } return s.join(dec) }