hello

Friday, 23 November 2012

change gridview checkbox color using javascript

 <script type="text/javascript">
        function changecolor(Id) {
            if (document.getElementById(Id).checked == true) {
                document.getElementById(Id).parentNode.style.backgroundColor = 'green';
            }
            else {
                document.getElementById(Id).parentNode.style.backgroundColor = 'red';
            }


        }
    </script>
</head>

onclick="javascript:changecolor(this.id)"

No comments:

Post a Comment