텍스트에 동적으로 줄긋는 방법 > script

본문 바로가기
사이트 내 전체검색

script

텍스트에 동적으로 줄긋는 방법

페이지 정보

작성자 서방님 댓글 0건 조회 109회 작성일 07-08-08 18:07

본문

<html>
<head>
    <title>BLUEB</title>

<script language="javascript">
function changeTextDecoration(strStyle)
{
  // 인터넷 익스플러 4.x이면...
  if (document.all) {
    document.all.objSampleTxt.style.textDecoration = strStyle;
  }
  // 인터넷 익스플로러 5.x이면...
  else if (document.getElementById) {
    document.getElementById('objSampleTxt').style.textDecoration = strStyle;
  }
}
</script>
</head>
<body>

<center>
<input type="button" value="삭제선 긋기" onclick="changeTextDecoration('line-through')">
<input type="button" value="밑줄 긋기" onclick="changeTextDecoration('underline')">
<input type="button" value="윗줄 긋기" onclick="changeTextDecoration('overline')">
<input type="button" value="원래대로" onclick="changeTextDecoration('none')">
<p>

    <table width=400 cellpadding=10><td bgcolor=efefef style="border:1px #777777 solid">
    <div id="objSampleTxt">
    DIV태그 안에 있는 텍스트 내용만 변경이 됩니다.<br>
    지금 상단에 버튼을 클릭하여 테스트 해보세요..
    </div>
    </td></table>

댓글목록

등록된 댓글이 없습니다.

Total 846건 35 페이지
게시물 검색

회원로그인

접속자집계

오늘
62
어제
302
최대
1,347
전체
155,123
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.