<%
'*******************************
'기능 : BBIMG (L1, Maximgheight, Maximgwidth)
'매개 변수 : L1, 이미지 경로; Maximgheight, 최대 허용 이미지 높이; Maximgwidth, 최대 허용 이미지 너비
'저자 : Alixi
'날짜 : 2007/7/12
'설명 : 페이지 이미지의 최대 높이와 너비 제한
'예 : <%= bbimg ( "alixixi.gif", 300,100)%>
'*******************************
functionbbimg (l1, maximgheight, maximgwidth)
Diml2, I2 : L2 = L1
seti2 = NewRegexp
i2.global = true
I2.IngoreCase = true
i2.pattern = "<img. [^>]*(src =" ". [^>]+?"). [^>]*> "
l2 = i2.replace (l2, "<img $ 1onload =" "JavaScript : if (this.width>"& maximgwidth & ") this.style.width ="& maximgwidth & "; if (this.height> "& maximgheight &") this.style.width = (this.width*"& maximgheight &")/this.Height; ""// this.Height; "///
bbimg = l2
seti2 = 아무것도
최종 기능 장애
%>