checked 된 항목을 readonly 할 수 있는 방법은?

<tr>
<td width='100%' bgcolor='white'><p>
<? for ( $i = 0 ; $i < 12 ; $i++ ) { ?>
<input type='checkbox' name='area[]' value='<?=$i?>' <? if (in_array("$i",$sarea) ) echo 'checked' ; ?> readonly > <?echo $area[$i]; ?> &nbsp;
<? } ?>
</td></tr>

readonly를 써도 계속 변경 됩니다.
checked 된 checkbox 항목을 readonly 할 수 있는 방법좀 부탁 드립니다.
감사합니다.
|

댓글 2개

전체적인 구문이 뭔지 잘 모르겠네요.
혹시 이런 게 아닌지...
<table>
<tr>
<td width='100%' bgcolor='white'>
<?
$sarea=array(9,10,7); $area=array();
for ( $i = 0 ; $i < 12 ; $i++ ) {
$state="";
if (in_array($i,$sarea)) $state="checked disabled";
?>
<?=$i?><input type='checkbox' name='area[$i]' value='<?=$i?>' <?=$state?>>
<?echo $area[$i];?>&nbsp;
<?}?>
</td></tr>
</table>
감사합니다. 덕분에 잘 해결 되었습니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
19년 전 조회 1,264
19년 전 조회 1,825
19년 전 조회 1,514
19년 전 조회 1,520
19년 전 조회 1,510
19년 전 조회 1,922
19년 전 조회 1,512
20년 전 조회 1,515
20년 전 조회 1,515
20년 전 조회 1,592
20년 전 조회 1,515
20년 전 조회 1,249
20년 전 조회 1,507
20년 전 조회 2,159
20년 전 조회 1,559
20년 전 조회 1,499
20년 전 조회 1,051
20년 전 조회 1,436
20년 전 조회 1,510
20년 전 조회 1,450
🐛 버그신고