IOS系统 兼容性 safiri浏览器对selected ="selected" 选中项 没反应

困扰很久的问题  safiri浏览器对selected ="selected" 选中项 没反应

直接上代码

对于safiri 浏览器没有作用 将attr替换成prop  完美解决

$("#selIndustyType option[value='1']").attr("selected", "selected");

$("#selIndustyType option[value='1']").prop("selected", "selected");

上网查了查 看到一张图 有用的幺?  

完美解释attr和prop使用的场景 赞赞赞

posted on 2020-09-01 09:39  caigan  阅读(230)  评论(0编辑  收藏  举报