

Memandangkan kita berada di pertengahan tahun 2026, era "pengecualian cukai jalan" tanpa pelepasan karbon (EV) kini telah berakhir secara rasmi. Seperti mana diketahui umum, pengecualian cukai jalan EV sebelum ini telah tamat pada 31 Disember 2025, dan struktur cukai jalan baharu Malaysia yang berasaskan kuasa kini telah aktif sepenuhnya untuk semua Kenderaan Elektrik Bateri (BEV).
Jika tempoh pembaharuan cukai jalan anda bakal tiba tidak lama lagi, anda tidak perlu panik. Struktur harga berasaskan kilowatt (kW) yang sedang berkuat kuasa ini terbukti jauh lebih murah berbanding kadar yang dikenakan ke atas kenderaan berkuasa petrol yang setara.
Berikut adalah pecahan yang jelas dan dikemas kini tentang cara sistem ini berfungsi serta cara untuk mengira kadar tahunan anda.
#ev-tax-calculator-widget { max-width: 550px; margin: 20px auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; } .ev-calc-container { background: white; border-radius: 12px; padding: 40px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); color: #333; } .ev-calc-header { margin-bottom: 32px; text-align: center; } .ev-calc-logo { margin-bottom: 20px; } .ev-calc-logo img { height: 50px; width: auto; } .ev-calc-header h2 { margin: 0 0 8px 0; font-size: 28px; font-weight: 700; color: #1e242f; } .ev-calc-header p { margin: 0; font-size: 14px; color: #666; font-weight: 400; } .ev-calc-form-group { margin-bottom: 24px; } .ev-calc-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; color: #1e242f; text-transform: uppercase; letter-spacing: 0.5px; } .ev-calc-search-wrapper { position: relative; } .ev-calc-search-input { width: 100%; padding: 12px 14px; font-size: 15px; border: 2px solid #e0e0e0; border-radius: 8px; background: white; color: #333; transition: all 0.3s ease; box-sizing: border-box; font-family: inherit; } .ev-calc-search-input:focus { outline: none; border-color: #26aef0; box-shadow: 0 0 0 3px rgba(38, 174, 240, 0.1); } .ev-calc-dropdown-list { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 2px solid #26aef0; border-top: none; border-radius: 0 0 8px 8px; max-height: 300px; overflow-y: auto; z-index: 1000; display: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .ev-calc-dropdown-list.show { display: block; } .ev-calc-dropdown-item { padding: 12px 14px; cursor: pointer; border-bottom: 1px solid #f0f0f0; transition: background 0.2s ease; } .ev-calc-dropdown-item:hover { background: #f5f5f5; } .ev-calc-dropdown-item.selected { background: #e3f2fd; color: #26aef0; font-weight: 600; } .ev-calc-input { padding: 12px 14px; font-size: 15px; border: 2px solid #e0e0e0; border-radius: 8px; background: white; color: #333; transition: all 0.3s ease; box-sizing: border-box; font-family: inherit; } .ev-calc-input:focus { outline: none; border-color: #26aef0; box-shadow: 0 0 0 3px rgba(38, 174, 240, 0.1); } .ev-calc-input-wrapper { display: flex; align-items: center; gap: 10px; } .ev-calc-input { flex: 1; } .ev-calc-unit { font-size: 14px; font-weight: 600; color: #26aef0; white-space: nowrap; min-width: 30px; } .ev-calc-divider { text-align: center; margin: 28px 0; font-size: 14px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 1px; } .ev-calc-note { background: #f5f5f5; border-left: 4px solid #26aef0; padding: 12px 14px; border-radius: 4px; font-size: 12px; line-height: 1.6; color: #666; margin-bottom: 24px; } .ev-calc-button { width: 100%; padding: 14px 20px; font-size: 16px; font-weight: 700; border: none; border-radius: 8px; background: #26aef0; color: white; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 24px; } .ev-calc-button:hover:not(:disabled) { background: #1e9cd9; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(38, 174, 240, 0.25); } .ev-calc-button:active:not(:disabled) { transform: translateY(0); } .ev-calc-button:disabled { background: #ccc; color: #999; cursor: not-allowed; } .ev-calc-model-link { background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 8px; padding: 14px; margin-bottom: 24px; display: none; } .ev-calc-model-link.show { display: block; } .ev-calc-model-link a { color: #26aef0; text-decoration: none; font-weight: 600; font-size: 14px; } .ev-calc-model-link a:hover { text-decoration: underline; } .ev-calc-result { background: #f9f9f9; border-radius: 8px; padding: 28px; margin-bottom: 24px; border: 1px solid #e0e0e0; display: none; } .ev-calc-result.show { display: block; animation: slideIn 0.3s ease; } @keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .ev-calc-result-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #e0e0e0; } .ev-calc-result-row:first-child { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px solid #e0e0e0; } .ev-calc-result-row:last-child { border-bottom: none; } .ev-calc-result-label { font-size: 14px; color: #666; font-weight: 500; } .ev-calc-result-value { font-size: 18px; font-weight: 700; color: #26aef0; } .ev-calc-result-value.large { font-size: 32px; color: #1e242f; } .ev-calc-error { background: #fee; border: 2px solid #fcc; color: #c33; padding: 12px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; display: none; } .ev-calc-error.show { display: block; } @media (max-width: 480px) { .ev-calc-container { padding: 24px; } .ev-calc-header h2 { font-size: 22px; } .ev-calc-result-value.large { font-size: 24px; } .ev-calc-result-row { flex-direction: column; align-items: flex-start; } .ev-calc-result-value { margin-top: 8px; } .ev-calc-dropdown-list { max-height: 250px; } }
Latest EV Road Tax Calculator Malaysia 2026 Rates
EV Model View on Carz.com.my OR Motor Power Output (kW) kW Note: Check your Vehicle Ownership Certificate (VOC/Geran) for your exact kW rating. Do NOT use kWh battery capacity. (kW = motor power output, kWh = battery storage capacity.) Calculate Road Tax View more details about this car EV Road Tax Yearly RM 0 Monthly Equivalent RM 0 Power Group Group - // Comprehensive EV Database with brand info const EV_MODELS = [ // Audi { name: 'Audi e-tron GT Standard (440 kW)', power: 440, brand: 'Audi' }, { name: 'Audi e-tron GT RS (456 kW)', power: 456, brand: 'Audi' }, { name: 'Audi Q4 e-tron Standard (210 kW)', power: 210, brand: 'Audi' }, { name: 'Audi Q4 e-tron Quattro (280 kW)', power: 280, brand: 'Audi' }, { name: 'Audi A6 e-tron Standard (260 kW)', power: 260, brand: 'Audi' }, { name: 'Audi A6 e-tron Quattro (360 kW)', power: 360, brand: 'Audi' }, // BMW { name: 'BMW i3 Standard (170 kW)', power: 170, brand: 'BMW' }, { name: 'BMW i3 S (184 kW)', power: 184, brand: 'BMW' }, { name: 'BMW i4 eDrive40 (250 kW)', power: 250, brand: 'BMW' }, { name: 'BMW i4 M50 (400 kW)', power: 400, brand: 'BMW' }, { name: 'BMW iX xDrive40 (240 kW)', power: 240, brand: 'BMW' }, { name: 'BMW iX M60 (455 kW)', power: 455, brand: 'BMW' }, { name: 'BMW iX1 xDrive50 (230 kW)', power: 230, brand: 'BMW' }, { name: 'BMW iX3 xDrive50 (210 kW)', power: 210, brand: 'BMW' }, { name: 'BMW i7 xDrive50 (400 kW)', power: 400, brand: 'BMW' }, { name: 'BMW i7 M70 (455 kW)', power: 455, brand: 'BMW' }, // BYD { name: 'BYD Atto 2 Standard (100 kW)', power: 100, brand: 'BYD' }, { name: 'BYD Atto 2 Extended (150 kW)', power: 150, brand: 'BYD' }, { name: 'BYD Dolphin Standard (70 kW)', power: 70, brand: 'BYD' }, { name: 'BYD Dolphin Extended (150 kW)', power: 150, brand: 'BYD' }, { name: 'BYD Atto 3 Standard (150 kW)', power: 150, brand: 'BYD' }, { name: 'BYD Atto 3 Extended (150 kW)', power: 150, brand: 'BYD' }, { name: 'BYD Seal RWD (150 kW)', power: 150, brand: 'BYD' }, { name: 'BYD Seal AWD Performance (390 kW)', power: 390, brand: 'BYD' }, { name: 'BYD Yuan Plus Standard (150 kW)', power: 150, brand: 'BYD' }, { name: 'BYD Aion Y Standard (150 kW)', power: 150, brand: 'BYD' }, // Chevrolet { name: 'Chevrolet Bolt EV Standard (120 kW)', power: 120, brand: 'Chevrolet' }, { name: 'Chevrolet Equinox EV Standard (210 kW)', power: 210, brand: 'Chevrolet' }, { name: 'Chevrolet Equinox EV AWD (255 kW)', power: 255, brand: 'Chevrolet' }, { name: 'Chevrolet Blazer EV Standard (210 kW)', power: 210, brand: 'Chevrolet' }, // Chery { name: 'Chery Omoda E5 Standard (150 kW)', power: 150, brand: 'Chery' }, { name: 'Chery iCar 03 Standard (135 kW)', power: 135, brand: 'Chery' }, // Citroën { name: 'Citroën e-C3 Standard (83 kW)', power: 83, brand: 'Citroën' }, { name: 'Citroën e-C4 Standard (100 kW)', power: 100, brand: 'Citroën' }, // Dacia { name: 'Dacia Spring Standard (44 kW)', power: 44, brand: 'Dacia' }, // Fiat { name: 'Fiat 500e Standard (118 kW)', power: 118, brand: 'Fiat' }, { name: 'Fiat 500e Abarth (155 kW)', power: 155, brand: 'Fiat' }, { name: 'Fiat 600e Standard (115 kW)', power: 115, brand: 'Fiat' }, // Ford { name: 'Ford Mustang Mach-E Standard (198 kW)', power: 198, brand: 'Ford' }, { name: 'Ford Mustang Mach-E AWD (358 kW)', power: 358, brand: 'Ford' }, { name: 'Ford F-150 Lightning Standard (300 kW)', power: 300, brand: 'Ford' }, { name: 'Ford F-150 Lightning Platinum (456 kW)', power: 456, brand: 'Ford' }, // Genesis { name: 'Genesis GV60 Standard (168 kW)', power: 168, brand: 'Genesis' }, { name: 'Genesis GV60 Advanced (239 kW)', power: 239, brand: 'Genesis' }, { name: 'Genesis Electrified G80 Standard (320 kW)', power: 320, brand: 'Genesis' }, { name: 'Genesis Electrified G80 AWD (390 kW)', power: 390, brand: 'Genesis' }, // Honda { name: 'Honda e Standard (100 kW)', power: 100, brand: 'Honda' }, { name: 'Honda e:Ny1 Standard (150 kW)', power: 150, brand: 'Honda' }, { name: 'Honda e:Ny1 AWD (230 kW)', power: 230, brand: 'Honda' }, // Hyundai { name: 'Hyundai Kona Electric Standard (150 kW)', power: 150, brand: 'Hyundai' }, { name: 'Hyundai Kona Electric Long Range (160 kW)', power: 160, brand: 'Hyundai' }, { name: 'Hyundai Ioniq 5 RWD (168 kW)', power: 168, brand: 'Hyundai' }, { name: 'Hyundai Ioniq 5 AWD (239 kW)', power: 239, brand: 'Hyundai' }, { name: 'Hyundai Ioniq 6 RWD (168 kW)', power: 168, brand: 'Hyundai' }, { name: 'Hyundai Ioniq 6 AWD (239 kW)', power: 239, brand: 'Hyundai' }, { name: 'Hyundai Ioniq 9 RWD (225 kW)', power: 225, brand: 'Hyundai' }, { name: 'Hyundai Ioniq 9 AWD (283 kW)', power: 283, brand: 'Hyundai' }, { name: 'Hyundai Casper Electric Standard (100 kW)', power: 100, brand: 'Hyundai' }, // Jaguar { name: 'Jaguar I-PACE Standard (294 kW)', power: 294, brand: 'Jaguar' }, // Jeep { name: 'Jeep Wrangler 4xe Standard (260 kW)', power: 260, brand: 'Jeep' }, { name: 'Jeep Grand Cherokee 4xe Standard (260 kW)', power: 260, brand: 'Jeep' }, // Kia { name: 'Kia EV3 Standard (150 kW)', power: 150, brand: 'Kia' }, { name: 'Kia EV3 Long Range (160 kW)', power: 160, brand: 'Kia' }, { name: 'Kia EV6 RWD (168 kW)', power: 168, brand: 'Kia' }, { name: 'Kia EV6 AWD (239 kW)', power: 239, brand: 'Kia' }, { name: 'Kia EV9 RWD (225 kW)', power: 225, brand: 'Kia' }, { name: 'Kia EV9 AWD (283 kW)', power: 283, brand: 'Kia' }, { name: 'Kia Niro EV Standard (150 kW)', power: 150, brand: 'Kia' }, // Leapmotor { name: 'Leapmotor T03 Standard (80 kW)', power: 80, brand: 'Leapmotor' }, { name: 'Leapmotor C10 Standard (170 kW)', power: 170, brand: 'Leapmotor' }, // Lexus { name: 'Lexus UX300e Standard (150 kW)', power: 150, brand: 'Lexus' }, { name: 'Lexus RZ 450e Standard (230 kW)', power: 230, brand: 'Lexus' }, // Lucid { name: 'Lucid Air Pure (420 kW)', power: 420, brand: 'Lucid' }, { name: 'Lucid Air Sapphire (750 kW)', power: 750, brand: 'Lucid' }, { name: 'Lucid Gravity Standard (420 kW)', power: 420, brand: 'Lucid' }, // Mazda { name: 'Mazda MX-30 Standard (107 kW)', power: 107, brand: 'Mazda' }, // Mercedes-Benz { name: 'Mercedes-Benz EQA Standard (140 kW)', power: 140, brand: 'Mercedes-Benz' }, { name: 'Mercedes-Benz EQA AMG (200 kW)', power: 200, brand: 'Mercedes-Benz' }, { name: 'Mercedes-Benz EQB Standard (215 kW)', power: 215, brand: 'Mercedes-Benz' }, { name: 'Mercedes-Benz EQE Standard (215 kW)', power: 215, brand: 'Mercedes-Benz' }, { name: 'Mercedes-Benz EQE AMG (300 kW)', power: 300, brand: 'Mercedes-Benz' }, { name: 'Mercedes-Benz EQS Standard (245 kW)', power: 245, brand: 'Mercedes-Benz' }, { name: 'Mercedes-Benz EQS AMG (385 kW)', power: 385, brand: 'Mercedes-Benz' }, { name: 'Mercedes-Benz GLC Electric Standard (150 kW)', power: 150, brand: 'Mercedes-Benz' }, // MG { name: 'MG MG4 Standard (125 kW)', power: 125, brand: 'MG' }, { name: 'MG MG4 Extended (150 kW)', power: 150, brand: 'MG' }, { name: 'MG ZS EV Standard (130 kW)', power: 130, brand: 'MG' }, { name: 'MG IM6 Standard (200 kW)', power: 200, brand: 'MG' }, // Mini { name: 'Mini Cooper SE Standard (135 kW)', power: 135, brand: 'Mini' }, { name: 'Mini Countryman SE Standard (230 kW)', power: 230, brand: 'Mini' }, // Neta { name: 'Neta V Standard (70 kW)', power: 70, brand: 'Neta' }, { name: 'Neta Aya Standard (70 kW)', power: 70, brand: 'Neta' }, { name: 'Neta X Standard (120 kW)', power: 120, brand: 'Neta' }, // Nissan { name: 'Nissan Leaf Standard (110 kW)', power: 110, brand: 'Nissan' }, { name: 'Nissan Leaf Plus (160 kW)', power: 160, brand: 'Nissan' }, { name: 'Nissan Ariya FWD (160 kW)', power: 160, brand: 'Nissan' }, { name: 'Nissan Ariya AWD (290 kW)', power: 290, brand: 'Nissan' }, // ORA { name: 'ORA Good Cat 400 Pro (105 kW)', power: 105, brand: 'ORA' }, { name: 'ORA Good Cat GT (126 kW)', power: 126, brand: 'ORA' }, // Perodua { name: 'Perodua QV-E Standard (150 kW)', power: 150, brand: 'Perodua' }, // Peugeot { name: 'Peugeot e-2008 Standard (100 kW)', power: 100, brand: 'Peugeot' }, { name: 'Peugeot e-3008 Standard (160 kW)', power: 160, brand: 'Peugeot' }, { name: 'Peugeot e-5008 Standard (160 kW)', power: 160, brand: 'Peugeot' }, // Polestar { name: 'Polestar 2 Single Motor (170 kW)', power: 170, brand: 'Polestar' }, { name: 'Polestar 2 Dual Motor (300 kW)', power: 300, brand: 'Polestar' }, { name: 'Polestar 3 Standard (300 kW)', power: 300, brand: 'Polestar' }, { name: 'Polestar 3 Performance (380 kW)', power: 380, brand: 'Polestar' }, // Porsche { name: 'Porsche Taycan RWD (300 kW)', power: 300, brand: 'Porsche' }, { name: 'Porsche Taycan 4S (390 kW)', power: 390, brand: 'Porsche' }, { name: 'Porsche Taycan GTS (440 kW)', power: 440, brand: 'Porsche' }, { name: 'Porsche Taycan Turbo (560 kW)', power: 560, brand: 'Porsche' }, { name: 'Porsche Macan Electric Standard (300 kW)', power: 300, brand: 'Porsche' }, // Proton { name: 'Proton eMas 5 Prime (58 kW)', power: 58, brand: 'Proton' }, { name: 'Proton eMas 5 Premium (85 kW)', power: 85, brand: 'Proton' }, { name: 'Proton eMas 7 Standard (160 kW)', power: 160, brand: 'Proton' }, { name: 'Proton eMas 7 Premium (160 kW)', power: 160, brand: 'Proton' }, // Renault { name: 'Renault Scenic E-Tech Standard (160 kW)', power: 160, brand: 'Renault' }, { name: 'Renault Scenic E-Tech Long Range (220 kW)', power: 220, brand: 'Renault' }, { name: 'Renault Megane E-Tech Standard (160 kW)', power: 160, brand: 'Renault' }, // Rivian { name: 'Rivian R1T Dual Motor (300 kW)', power: 300, brand: 'Rivian' }, { name: 'Rivian R1T Quad Motor (456 kW)', power: 456, brand: 'Rivian' }, { name: 'Rivian R1S Dual Motor (300 kW)', power: 300, brand: 'Rivian' }, { name: 'Rivian R1S Quad Motor (456 kW)', power: 456, brand: 'Rivian' }, // Skoda { name: 'Skoda Enyaq Standard (150 kW)', power: 150, brand: 'Skoda' }, { name: 'Skoda Enyaq RS (220 kW)', power: 220, brand: 'Skoda' }, { name: 'Skoda Citigo Standard (83 kW)', power: 83, brand: 'Skoda' }, // Smart { name: 'Smart #1 Pro (200 kW)', power: 200, brand: 'Smart' }, { name: 'Smart #1 Brabus (315 kW)', power: 315, brand: 'Smart' }, { name: 'Smart #5 Standard (200 kW)', power: 200, brand: 'Smart' }, // Subaru { name: 'Subaru Solterra Standard (160 kW)', power: 160, brand: 'Subaru' }, { name: 'Subaru Solterra AWD (160 kW)', power: 160, brand: 'Subaru' }, // Tesla { name: 'Tesla Model 3 RWD (208 kW)', power: 208, brand: 'Tesla' }, { name: 'Tesla Model 3 Long Range (366 kW)', power: 366, brand: 'Tesla' }, { name: 'Tesla Model 3 Performance (461 kW)', power: 461, brand: 'Tesla' }, { name: 'Tesla Model Y RWD (220 kW)', power: 220, brand: 'Tesla' }, { name: 'Tesla Model Y Long Range (393 kW)', power: 393, brand: 'Tesla' }, { name: 'Tesla Model Y Performance (456 kW)', power: 456, brand: 'Tesla' }, { name: 'Tesla Model S Long Range (405 kW)', power: 405, brand: 'Tesla' }, { name: 'Tesla Model S Plaid (750 kW)', power: 750, brand: 'Tesla' }, { name: 'Tesla Model X Long Range (405 kW)', power: 405, brand: 'Tesla' }, { name: 'Tesla Model X Plaid (750 kW)', power: 750, brand: 'Tesla' }, { name: 'Tesla Cybertruck RWD (300 kW)', power: 300, brand: 'Tesla' }, { name: 'Tesla Cybertruck AWD (456 kW)', power: 456, brand: 'Tesla' }, // Toyota { name: 'Toyota bZ4X FWD (150 kW)', power: 150, brand: 'Toyota' }, { name: 'Toyota bZ4X AWD (160 kW)', power: 160, brand: 'Toyota' }, // Volkswagen { name: 'Volkswagen ID.3 Standard (150 kW)', power: 150, brand: 'Volkswagen' }, { name: 'Volkswagen ID.4 Standard (210 kW)', power: 210, brand: 'Volkswagen' }, { name: 'Volkswagen ID.4 AWD (280 kW)', power: 280, brand: 'Volkswagen' }, { name: 'Volkswagen ID.5 Standard (210 kW)', power: 210, brand: 'Volkswagen' }, { name: 'Volkswagen ID.5 GTX (299 kW)', power: 299, brand: 'Volkswagen' }, { name: 'Volkswagen ID.7 Standard (210 kW)', power: 210, brand: 'Volkswagen' }, // Volvo { name: 'Volvo EX30 Single Motor (200 kW)', power: 200, brand: 'Volvo' }, { name: 'Volvo EX30 Twin Motor (315 kW)', power: 315, brand: 'Volvo' }, { name: 'Volvo EX40 Standard (210 kW)', power: 210, brand: 'Volvo' }, { name: 'Volvo EX60 Standard (300 kW)', power: 300, brand: 'Volvo' }, { name: 'Volvo EX90 Twin Motor (300 kW)', power: 300, brand: 'Volvo' }, { name: 'Volvo C40 Recharge Standard (300 kW)', power: 300, brand: 'Volvo' }, // XPeng { name: 'XPeng G6 RWD (218 kW)', power: 218, brand: 'XPeng' }, { name: 'XPeng G6 AWD (358 kW)', power: 358, brand: 'XPeng' }, { name: 'XPeng G9 RWD (230 kW)', power: 230, brand: 'XPeng' }, { name: 'XPeng G9 AWD (358 kW)', power: 358, brand: 'XPeng' }, // Zeekr { name: 'Zeekr X RWD (200 kW)', power: 200, brand: 'Zeekr' }, { name: 'Zeekr X AWD (315 kW)', power: 315, brand: 'Zeekr' }, { name: 'Zeekr 001 Standard (200 kW)', power: 200, brand: 'Zeekr' }, { name: 'Zeekr 001 AWD (315 kW)', power: 315, brand: 'Zeekr' }, ]; const TAX_BANDS = [ { name: 'A', min: 1, max: 100, base: 20, increment: 10 }, { name: 'B', min: 100.001, max: 210, base: 80, increment: 20 }, { name: 'C', min: 210.001, max: 320, base: 280, increment: 30 }, { name: 'D', min: 320.001, max: 430, base: 880, increment: 40 }, { name: 'E', min: 430.001, max: 540, base: 1320, increment: 50 }, { name: 'F', min: 540.001, max: 650, base: 1820, increment: 60 }, { name: 'G', min: 650.001, max: 760, base: 2420, increment: 70 }, { name: 'H', min: 760.001, max: 870, base: 3120, increment: 80 }, { name: 'I', min: 870.001, max: 980, base: 3920, increment: 90 }, { name: 'J', min: 980.001, max: 1010, base: 4820, increment: 100 }, { name: 'K', min: 1010.001, max: Infinity, base: 20000, increment: 0 }, ]; const BLOCK_SIZE = 10; let selectedModel = null; function initializeSearch() { const searchInput = document.getElementById('ev-model-search'); const dropdownList = document.getElementById('ev-model-list'); searchInput.addEventListener('focus', () => { // Only show dropdown if user has typed something if (searchInput.value.length > 0) { filterModels(searchInput.value.toLowerCase().trim()); } }); searchInput.addEventListener('input', (e) => { const query = e.target.value.toLowerCase().trim(); if (query.length === 0) { // Close dropdown when search is cleared dropdownList.classList.remove('show'); } else { filterModels(query); } }); document.addEventListener('click', (e) => { if (!e.target.closest('.ev-calc-search-wrapper')) { dropdownList.classList.remove('show'); } }); } function displayAllModels() { const dropdownList = document.getElementById('ev-model-list'); dropdownList.innerHTML = ''; EV_MODELS.forEach((model, index) => { const item = document.createElement('div'); item.className = 'ev-calc-dropdown-item'; item.textContent = model.name; item.onclick = () => selectModel(model, index); dropdownList.appendChild(item); }); // Don't auto-show - only show on user interaction } function filterModels(query) { const dropdownList = document.getElementById('ev-model-list'); const filtered = EV_MODELS.filter(model => model.name.toLowerCase().includes(query) ); dropdownList.innerHTML = ''; if (filtered.length === 0) { const noResult = document.createElement('div'); noResult.className = 'ev-calc-dropdown-item'; noResult.textContent = 'No models found'; noResult.style.color = '#999'; dropdownList.appendChild(noResult); } else { filtered.forEach((model, index) => { const item = document.createElement('div'); item.className = 'ev-calc-dropdown-item'; item.textContent = model.name; item.onclick = () => selectModel(model, index); dropdownList.appendChild(item); }); } dropdownList.classList.add('show'); } function selectModel(model, index) { selectedModel = model; document.getElementById('ev-model-search').value = model.name; document.getElementById('motor-power').value = ''; document.getElementById('ev-model-list').classList.remove('show'); // Show carz.com.my link const brandSlug = model.brand.toLowerCase().replace(/\s+/g, '-'); const linkElement = document.getElementById('ev-model-link'); const linkText = document.getElementById('ev-model-link-text'); linkText.href = `https://www.carz.com.my/cars/${brandSlug}`; linkElement.classList.add('show'); } function onManualPowerChange() { document.getElementById('ev-model-search').value = ''; selectedModel = null; document.getElementById('ev-model-link').classList.remove('show'); } function findBand(power) { return TAX_BANDS.find(band => power >= band.min && power
