|
|
관리자
|
14년 전
|
조회 2,196
|
|
|
|
14년 전
|
조회 1,851
|
|
|
|
14년 전
|
조회 1,895
|
|
|
|
14년 전
|
조회 1,770
|
|
|
|
14년 전
|
조회 1,868
|
|
|
|
14년 전
|
조회 1,826
|
|
|
관리자
|
14년 전
|
조회 2,334
|
|
|
|
14년 전
|
조회 2,018
|
|
|
|
14년 전
|
조회 2,268
|
|
|
|
14년 전
|
조회 2,066
|
|
|
|
14년 전
|
조회 1,877
|
|
|
|
14년 전
|
조회 2,088
|
|
|
|
14년 전
|
조회 1,829
|
|
|
|
14년 전
|
조회 2,234
|
|
|
|
14년 전
|
조회 2,293
|
|
|
|
14년 전
|
조회 1,776
|
|
|
|
14년 전
|
조회 1,246
|
|
|
|
14년 전
|
조회 1,158
|
|
|
|
14년 전
|
조회 1,265
|
|
|
|
14년 전
|
조회 1,232
|
|
|
|
14년 전
|
조회 1,185
|
|
|
|
14년 전
|
조회 1,178
|
|
|
|
14년 전
|
조회 1,179
|
|
|
|
14년 전
|
조회 1,228
|
|
|
|
14년 전
|
조회 930
|
|
|
|
14년 전
|
조회 1,134
|
|
|
|
14년 전
|
조회 1,129
|
|
|
|
14년 전
|
조회 2,710
|
|
|
|
14년 전
|
조회 1,785
|
|
|
|
14년 전
|
조회 1,844
|
댓글 6개
그럼 배열로 읽어서 하는 방법이 있지 않나요?
질문의 의도가 확실히 파악안되는 1인
이럴때 에디터로 입력된 각각의 이미지의 사이즈를 구하고 싶습니다..
write_update.skin.php 에서 "에디터에서 이미지 경로 추출 시작" 부분을 참조하세요.
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=97335
<script type="text/javascript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
</script>