gpt4 book ai didi

javascript - 选择选项中的照片不是 shawn in chrome?

转载 作者:行者123 更新时间:2023-11-30 09:55:11 24 4
gpt4 key购买 nike

<分区>

我的选择选项有点问题!问题是,如果我将照片放在列表中,它们会显示在 Fire-Fox 中,但在 chrome 中则不会!

这是我的代码:

function change() {

select = document.getElementById("select");
select_s = select.style;

switch(select.selectedIndex) {

case 0 :
select_s.background = "url('http://apistudyabroad.wpengine.netdna-cdn.com/wp-content/themes/API-custom/images/study_abroad_uae_flag.png') no-repeat";
break;

case 1 :
select_s.background = "url('http://apistudyabroad.wpengine.netdna-cdn.com/wp-content/themes/API-custom/images/study_abroad_uae_flag.png') no-repeat";
break;
}
}
<body>

<select id="select" onchange="change();">
<option style="background:url('http://apistudyabroad.wpengine.netdna-cdn.com/wp-content/themes/API-custom/images/study_abroad_uae_flag.png') no-repeat; width:100px; height:100px;"></option>
<option style="background:url('http://apistudyabroad.wpengine.netdna-cdn.com/wp-content/themes/API-custom/images/study_abroad_uae_flag.png') no-repeat; width:100px; height:100px;" </option>
</select>


</body>

感谢您的帮助!

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com