js设置input值和select值

// 新增方法,方便Iframe调用
window.changeInputVal = function(select,val){
    $(select).val(val).trigger('input');
}
window.changeSelectOption = function(select,val){
    $(select).find(`option[value='${val}']`).attr("selected",true);
}

猜你喜欢

转载自blog.csdn.net/weixin_37064409/article/details/130709830