추가1 : <textarea id=txt1 style="display:none;" rows="0" cols="0">
<embed
// 기존 플래시 등 embeded나 동적객체 내용 들어가는 구문
</embed>
추가2 : </textarea>
추가3 : <script language="javascript" src=http://cgnmall.net/z_main/okplugin_js.php?txtid=txt1>
-- 설명 ---
1) 해당 <object... 또는 <embed... 의 시작과 끝을
<textarea id=txt1 style="display:none;" rows="0" cols="0">
와 </textarea> 태그로 뒤덮는다.
id 값은 임의로 정하되, 같은 페이지 내에서 여러번 사용할 경우에는
txt1, txt2, ... 식으로 하면된다.
2) </textarea> 아래에
2-1) asp 일 경우에는 ===================================================
<script language="javascript" src=http://www.cgntv.net/z_main/okplugin_js.asp?txtid=txt1></script>
를 삽입합니다.
okplugin_js.asp 의 내용은 아래 단 한줄 :
document.write(document.getElementById('<%=request.querystring("txtid")%>').value);
입니다.
2-2) php 일 경우는
<script language="javascript" src=http://cgnmall.net/z_main/okplugin_js.php?txtid=txt1></script>
를 삽입합니다.
okplugin_js.php 의 내용은 단 한줄
document.write(document.getElementById('<?=$txtid?>').value);
입니다.
=======================================================
다만 okplugin_js.asp 나 okplugin_js.php 파일은
님의 서버에 생성시키는 것이 더 좋겠지요.
okplugin_js.asp 파일은 한번만 생성해놓으면 끝이죠.
IE 의 패치도 피할뿐 아니라, 파이어폭스에서도 작동에 문제가 전혀 없는 코딩입니다.
글출처 : http://blog.naver.com/jglory/70002034042
새댓글
전체보기