글쓰기에서 스크립트가 작동이 안됩니다.

· 2011-08-08 (월) 13:27:22 · 1390 · 2
input 값에 글자 미리보여주고 input 클릭하면 미리보여주는 글자가 사라지는 스크립트인데
유독 글쓰기 에서만 글자가 안사라지네요 -_-
우짜면 좋을까요 ㅠㅠ

<script>

var count = 0;


function chec(name) {
count++;
if(count == 1){
var doc=document.body.createTextRange();
doc.moveToElementText(document.all(name));
doc.select();
doc.execCommand('delete');
return;
}else{
return;
}
}

</script>

<textarea name='wr_content' id='wr_content' class=ed style="font-family:굴림체; color:#000; padding:10px;line-height:15px;margin:auto; margin-top:0px; overflow: hidden; width:130px; height:100px; font-size: 9pt; border:0; background-color:#88C8F8;" cols="10" onkeyup="byte_check('wr_content', 'sms_bytes');" accesskey="m" itemname='메세지' onFocus='chec(this.name);this.style.color=000000;' onclick='chec(this.name);this.style.color=000000;'>※ 핸드폰번호는 숫자만 입력바랍니다.</textarea>
|

댓글 2개

2011-08-08 (월) 13:54:14
되는데요..
근데 onclick이 굳이 있어야 할 이유가 있나요..
onfocus만으로 충분할거 같은데..
저는 베이직스킨인데 안되네요 ㅠㅠ
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
11-08-08 조회 960
11-08-08 조회 1,091
11-08-08 조회 1,013
11-08-08 조회 1,691
11-08-08 조회 1,426
11-08-08 조회 1,391
11-08-08 조회 2,104
11-08-08 조회 1,102
11-08-08 조회 1,676
11-08-08 조회 2,462
11-08-08 조회 1,791
11-08-08 조회 2,059
11-08-08 조회 1,606
11-08-08 조회 2,107
11-08-08 조회 1,720
11-08-08 조회 974
11-08-08 조회 2,128
11-08-08 조회 1,239
11-08-08 조회 5,877
11-08-08 조회 1,377