Textare 에 이미지 넣기
작성자 : 단국강토
등록날짜 : 2009.02.19 10:39
<html>
<body>
<table border="0">
<tr><td>
<input type="button" name="11" onClick="fnSetImg('http://wstatic.naver.com/w/n_c600.gif');" value="이미지추가" class="EditorImg" />
</td></tr>
<tr><td>
<textarea style="display:none" name="comment"></textarea>
<iframe width="800" height="650" id="Editor"></iframe>
</td></tr>
</table>
</body>
<script type="text/javascript" language="javascript">
var fm= frames.Editor;
fm.document.designMode = "ON";
function fnSetImg(imgPath) {
// 이미지 태그 삽입
var str = "<img src="+ imgPath +" />";
fm.focus();
fm.document.selection.createRange().pasteHTML(str);
}
</script>
</html>
[출처] 항해자
"쇼핑몰·홈페이지·오픈마켓
블로그·페이스북·이메일 등의 각종 마케팅 글쓰기, 각종 광고, 영업, 판매, 제안서, 전단지 반응율 3배×10배 이상 높이는 마법의 8단계 공식" |
☞자세히보기 |
|
|