SoFunction
Updated on 2025-03-10

JavaScript checkbox/radio onchange is not compatible with ie8 handling method

JavaScript checkbox/radio onchange is not compatible with ie8 handling method

Under ie8, checkbox's onchange failed to implement the function that triggers customization. How to solve this problem is as follows:

function forIe(){ 
  if($.){ //Discern whether the browser is ie    $("input[type='checkbox']").click(function(){ 
      (); //Lost focus first and perform your custom operation      ();//Get the focus again, where the mouse is still in order to perform the next operation    }) 
  } 
} 

Just reference it on the corresponding set page:

$(function(){ 
    forIe(); 
  }) 

Thank you for reading, I hope it can help you. Thank you for your support for this site!