웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
자바 스크립트 소스 올릴때 예제 쉽게 보이기
2003.03.12 20:55
제목이 맞게 됐는지 모르겠네요
제가 글 솜씨가 없어서
그냥 예제 보시면 이해 되실듯....
미리보기 : http://xscool.cafe24.com/bbs/zboard.php?id=story2&page=1&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=18
-------------------- 아래가 소스 입니다 ------------------------
<script language="javascript">
function showPreview(pvObj)
{var wname = "preview";
var wopt = "menubar=yes,scrollbars=yes,status=yes,resizable=yes,width=640,height=480";
winResult = window.open("about:blank",wname,wopt);
winResult.document.open("text/html", "replace");
winResult.document.write(pvObj.value);
winResult.document.close();
return false;}
</script>
<table width="508" border="0" style="table-layout:fixed">
<form name="previewform" onSubmit="return false">
<tr><td width="502" height="420">
<input type="button" class="button" value="미리보기" onClick="return showPreview(this.form.exsrc)" style="color:black; background-color:rgb(204,153,0);"><br>
<textarea name="exsrc" class="entry" rows="25" style="border-color:rgb(204,153,0); border-style:solid; width:100%;" cols="68">
★이부분에 소스를 적어 줍니다.★
</textarea>
</td></tr>
</form>
</table>
-------------------- 요기 까지 ------------------------
제가 글 솜씨가 없어서
그냥 예제 보시면 이해 되실듯....
미리보기 : http://xscool.cafe24.com/bbs/zboard.php?id=story2&page=1&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=18
-------------------- 아래가 소스 입니다 ------------------------
<script language="javascript">
function showPreview(pvObj)
{var wname = "preview";
var wopt = "menubar=yes,scrollbars=yes,status=yes,resizable=yes,width=640,height=480";
winResult = window.open("about:blank",wname,wopt);
winResult.document.open("text/html", "replace");
winResult.document.write(pvObj.value);
winResult.document.close();
return false;}
</script>
<table width="508" border="0" style="table-layout:fixed">
<form name="previewform" onSubmit="return false">
<tr><td width="502" height="420">
<input type="button" class="button" value="미리보기" onClick="return showPreview(this.form.exsrc)" style="color:black; background-color:rgb(204,153,0);"><br>
<textarea name="exsrc" class="entry" rows="25" style="border-color:rgb(204,153,0); border-style:solid; width:100%;" cols="68">
★이부분에 소스를 적어 줍니다.★
</textarea>
</td></tr>
</form>
</table>
-------------------- 요기 까지 ------------------------
댓글 2
-
TheMics
2003.03.13 16:43
이왕이면 readonly를 넣는것이 좋지 않을까요; -
RedEye
2003.04.14 12:19
이 방법을 게시판에서 글쓸때 따로 소스로 쓰는 textarea를 하나 더 만들어 본문에 textarea 로뿌려주는 팁용으로 쓴다면 더 좋겠지요..
제목 | 글쓴이 | 날짜 |
---|---|---|
[PHP 동영상강의] 32. 자료의 정렬순서를 바꿔보자. [8] | 서기 | 2006.01.11 |
[PHP 동영상강의] 31. DB에서 값을 가져와 출력하기 [15] | 서기 | 2006.01.05 |
[PHP 동영상강의] 30. 테이블에 값을 추가해보자 [17] | 서기 | 2006.01.04 |
[PHP 동영상강의] 29. 테이블을 만들어보자! [5] | 서기 | 2006.01.04 |
[PHP 동영상강의] 28. SQL이란, phpmyadmin 설치방법 [5] | 서기 | 2006.01.03 |
[PHP 동영상강의] 27. 기본적인 환경변수들 [4] | 서기 | 2006.01.03 |
채널을 가장 쉽게 하는법 [17] | 미오유 | 2006.01.02 |
[PHP 동영상강의] 26. 쿠키의 시간제한 [2] | 서기 | 2005.12.26 |
PHP 구문 5가지 표기 방식 [6] | 이강민 | 2005.12.23 |
[PHP 동영상강의] 25. 회원가입처리 / 로그인 구현 [6] | 서기 | 2005.12.16 |
[PHP 동영상강의] 24. 쿠키의 사용 [3] | 서기 | 2005.12.13 |
[PHP 동영상강의] 23. 파일을 이용한 간단한 카운터 제작하기 [4] | 서기 | 2005.12.12 |
[PHP 동영상강좌] 22. 다른 사이트의 특정부위만 가져오기 [7] | 서기 | 2005.12.08 |
[PHP 동영상강좌] 21. 파일을 이용한 메모장 만들기 #3 [3] | 서기 | 2005.12.08 |
[PHP 동영상강좌] 20. 파일을 이용한 메모장 만들기 #2 [6] | 서기 | 2005.12.07 |
[PHP 동영상강의] 19. 파일을 이용한 메모장 만들기 #1 [10] | 서기 | 2005.11.29 |
[PHP 동영상강의] 18. 파일의 생성과 사용 [9] | 서기 | 2005.11.28 |
[PHP 동영상강좌] 17. 배열변수의 사용 [9] | 서기 | 2005.11.25 |
[PHP 동영상강좌] 16. for 반복문의 사용 [8] | 서기 | 2005.11.24 |
[PHP 동영상강좌] 15. 여러개의 파일을 이용한 설문조사 [7] | 서기 | 2005.11.23 |