在动态给select添加了option的时候 立即对select进行操作 会引发未知的属性错误

 

将对select进行操作的方法写在settimeout里问题解决

setTimeout(function() {
$("#selCourse option").attr("selected",true);//你的方法
}, 1);

相关文章:

  • 2021-08-19
  • 2021-08-18
  • 2021-11-10
  • 2021-10-24
  • 2022-01-12
  • 2022-01-29
  • 2021-08-14
  • 2022-02-15
猜你喜欢
  • 2022-12-23
  • 2021-10-06
  • 2021-10-05
  • 2021-09-29
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案