td 백그라운드 자바스크립트 처리시에 익스, 크롬이 다르게 출력되네요. 채택완료
td 백그라운드 자바스크립트 처리시에 익스, 크롬이 다르게 출력되네요.
</p><p> </p><p> <td align=center id="bgimage4">
<img src="" id="message1" width="70" height="100" />
<img src="" id="message" width="70" height="100" />
</td>
<td align=center width="5%">
<div style="font-size:75px"><font color="white">:</font></div>
</td></p><p><td align=center id="bgimage3"></p><p> <img src="" id="message3" width="70" height="100" />
<img src="" id="message2" width="70" height="100" />
</td>
<td align=center width="5%">
<div style="font-size:75px"><font color="white">:</font></div>
</td></p><p> <td align=center id="bgimage2" width="300" height="202">
<img src="" id="message5" width="60" height="100" />
<img src="" id="message4" width="60" height="100" />
</td></p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p><script></p><p> document.getElementById( "bgimage2" ).background = bgimages;
document.getElementById( "bgimage3" ).background = bgimagem;
document.getElementById( "bgimage4" ).background = bgimageh; </p><p></script></p><p>
위 소스와같이 여러분들의 도움으로. 구현했습니다. 백그라운드이미지로 삽입시켜 출력하게 잘나오는데요.
문제는.... 익스플로어에서는 잘됩니다만, 크롬에서는 백그라운드 이미지가 전혀 출력이 안되네요. .
익스크롬, 둘다 되게 하는 방법이 어떤것이 있을가요? ...
도움부탁드립니다.
감사합니다.
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
답변을 작성하려면 로그인이 필요합니다.
로그인
[code]
<td align="center" width="20%" id="test">
<td align="center" width="20%" id="test2">
<script>
bgimages = "0.jpg";
bgimagem = "1.jpg";
document.getElementById('test').style.backgroundImage='url(' + bgimages + ')';
document.getElementById('test2').style.backgroundImage='url(' + bgimagem + ')';
</script>
[/code]
위 코드에서
document.getElementById('test').style.backgroundImage='url(' + bgimages + ')';
이것만 사용해서 출력할때는 잘됩니다.
그러나
document.getElementById('test').style.backgroundImage='url(' + bgimages + ')';
document.getElementById('test2').style.backgroundImage='url(' + bgimagem + ')';
2개를 넣어 출력할려할시에는 1개만 나오네요. 에러가 나지는 않고요.
그냥 정상적으로 test 만 출력이 됩니다. test2 는 작동안하네요.;;
조언 및 답변 부탁드립니다.
감사합니다.