웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
플래시 크기 바꾸기 [IE/NS 겸용]
2003.10.13 02:08
<script>
function change_size() {
var f=document.show; // form 이름으로 대체
var g=document.getElementById('player1'); // 'player1'을 실제 player의 id로 대체
if (!f.width2.value||!f.height2.value||f.width2.value<0||f.width2.value>999||f.height2.value<0||f.height2.value>999) {
return false;
}
g.style.width=f.width2.value;
g.style.height=f.height2.value;
}
function change_size2(obj) {
var idx=obj.selectedIndex;
var f=document.show; // form 이름
var g=document.getElementById('player1'); // 상동
f.width2.value=f.width.value * obj.options[idx].value;
f.height2.value=f.height.value * obj.options[idx].value;
change_size();
}
</script>
<form name=show>
너비 :
<input type=text maxlength=3 name="width2" value="<?=$_POST['width']?$_POST['width']:0?>" size=4>
높이 :
<input type=text maxlength=3 name="height2" size=4 value="<?=$_POST['height']?$_POST['height']:0?>">
<select name="ratio" onchange="change_size2(this)">
<option value='1.0' selected>1.0x</option>
<option value='1.5'>1.5x</option>
<option value='2.0'>2.0x</option></select>
<embed id=player1 src=test.swf width=400 height=200></embed>
<input type="hidden" name="width" value="<?=$width?>"><input type="hidden" name="height" value="<?=$height?>">
</form>
우선 width와 height에 기본값이 들어가야 하구요, width2와 height2가 실질적으로 바뀌어 적용될 부분입니다.
function change_size() {
var f=document.show; // form 이름으로 대체
var g=document.getElementById('player1'); // 'player1'을 실제 player의 id로 대체
if (!f.width2.value||!f.height2.value||f.width2.value<0||f.width2.value>999||f.height2.value<0||f.height2.value>999) {
return false;
}
g.style.width=f.width2.value;
g.style.height=f.height2.value;
}
function change_size2(obj) {
var idx=obj.selectedIndex;
var f=document.show; // form 이름
var g=document.getElementById('player1'); // 상동
f.width2.value=f.width.value * obj.options[idx].value;
f.height2.value=f.height.value * obj.options[idx].value;
change_size();
}
</script>
<form name=show>
너비 :
<input type=text maxlength=3 name="width2" value="<?=$_POST['width']?$_POST['width']:0?>" size=4>
높이 :
<input type=text maxlength=3 name="height2" size=4 value="<?=$_POST['height']?$_POST['height']:0?>">
<select name="ratio" onchange="change_size2(this)">
<option value='1.0' selected>1.0x</option>
<option value='1.5'>1.5x</option>
<option value='2.0'>2.0x</option></select>
<embed id=player1 src=test.swf width=400 height=200></embed>
<input type="hidden" name="width" value="<?=$width?>"><input type="hidden" name="height" value="<?=$height?>">
</form>
우선 width와 height에 기본값이 들어가야 하구요, width2와 height2가 실질적으로 바뀌어 적용될 부분입니다.
댓글 4
제목 | 글쓴이 | 날짜 |
---|---|---|
오늘의 명언을 출력해주는 함수 [10] | 김재경 | 2004.06.15 |
아이피 접근을 막고 메세지 출력하기.. [11] | ☺심심 | 2004.06.24 |
페이지에 암호를 걸자..=_= [27] | ☺심심 | 2004.06.25 |
파일업로드시 파일명 중복되지 않게 저장하기.. [8] | 페리 | 2004.06.28 |
서버가 느려졌을경우... [20] | 신상우 | 2004.06.28 |
<와 <=의 속도차이? [23] | 플로렐라 | 2004.07.07 |
++와 +=1 의 속도차이 [7] | 플로렐라 | 2004.07.12 |
히어닥 문법 활용 [14] | ☺심심 | 2004.07.13 |
트랙백 구현하기 - 3. PHP로 트랙백 핑 보내기
[4]
![]() | TheMics | 2004.07.18 |
트랙백 구현하기 - 4. PHP로 트랙백 핑 받기
![]() | TheMics | 2004.07.18 |
rand함수와 mt_rand함수의 비교 [6] | 심심타 | 2004.07.30 |
디비내용을 엑셀,워드,파워포인트 파일로 다운로드 시키는 방법 [13] | QQQ | 2004.07.30 |
php로 이미지를 mysql디비 저장하고 보여주는 소스 [2] | QQQ | 2004.07.30 |
IP 뒤에 두칸 글자 길이에 따라서 *로 나타내기 [13] | Sy-Tgt(stargt) | 2004.07.30 |
ISO 3166 국가코드로인한, 국가 검출소스 [4] | kein23 | 2004.08.04 |
파일업로드시 파일명 중복되지 않게 저장하기... [6] | 김지호 | 2004.08.06 |
PHP프로그램에 간단한 인증(로그인) 걸기. [15] | Lepas | 2004.08.09 |
접속자 IP 주소 텍스트로 저장 [7] | 천상원 | 2004.08.15 |
공유 메모리 제어에 관한 함수 정리 (공유메모리) [5] | Simsim | 2004.08.16 |
4. include, require 그리고 뽀나쓰~ [8] | 티다 | 2004.08.19 |