Wednesday, December 1, 2010

input text : readonly attribute

<script type="text/javascript">

function blah(bool) {
   if(bool) {
      document.getElementById("ta").readOnly = true;
   }
   else {
      document.getElementById("ta").readOnly = false;
   }
}

</script>

<textarea id="ta"></textarea>
<input type="checkbox" onclick="blah(this.checked)" />

1 comment:

  1. Are you trying to make cash from your visitors via popunder advertisments?
    In case you do, have you tried using EroAdvertising?

    ReplyDelete