change the src value of an image based on the options value in a select box

后端 未结 4 1242
闹比i
闹比i 2020-12-14 13:34

I have an img tag and a select box




    
    
    




$(document).ready(function(){
    $('.image-swap').attr("src",$('#kitchen_color').val());
})

function change_image(){
    $('.image-swap').attr("src",$('#kitchen_color').val());
}

提交回复
热议问题