2013년 2월 13일 수요일
[ Jsp ][ jQuery ] 이미지 넓이 조정 / 이미지 표 넓이 맞추기
표안에 이미지를 넣었는데
유독 explorer에서만 이미지가 표자체 넓이를 넓혀서
jQuery부분
<script src="COMMON/jQuery.js" type="text/javascript"></script>
<SCRIPT TYPE="TEXT/JAVASCRIPT">
$(document).ready(function() {
for(var i = 1; i<10; i++){
for ( var j = 1; j < 10; j++) {
var tdWidth=0;
var imgWidth=0;
var id = "TD_" + i+"_"+j;
tdWidth = $("#" + id).width();
var imgid = "IMG_" + i+"_"+j;
imgWidth = $("#" + imgid).width();
if( tdWidth > imgWidth ){
$("#" + imgid).width(tdWidth);
}
}
}
});
<script>
이미지 부분 width를 10px주고 페이지 로드시에 넓이 조정하게 했다.
<img src="/SAVEIMG/<%=session.getAttribute("APPNAME").toString()%>/${LOT_IMAGE}/${cnt}_${chkcnt}.${RESULT_LIST.chk[chkcnt-1][cnt-1]}"
id="IMG_${cnt}_${chkcnt}" width=10px>
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기