나는 2 개의 이미지가 theImg_enabled.gif
과 theImg_disabled.gif
라고합니다. img src
을 동적으로 변경해야합니다. CSS로 어떻게 할 수 있습니까?CSS에서 img src를 동적으로 변경할 수 있습니까?
<img class="changeImg" src="theImg_enabled.gif" alt="" width="16" height="16" border="0"/>
<style>
.changeImg {
// I need src="theImg_enabled.gif"
}
.changeImg.disabled {
// I need src="theImg_disabled.gif"
}
</style>