<script language="javascript">
function myCheckbox(obj,thisobj)
{
var o = document.getElementById(obj);
if(o.checked)
{
thisobj.style.backgroundImage="url(checkOff.JPG)";
o.checked = false;
}
else
{
thisobj.style.backgroundImage="url(checkOn.JPG)";
o.checked = true;
}
}
</script>
<form id="form1" name="form1" method="post" action="">
<h5>下边是美化了的checkbox</h5>
<input type="checkbox" name="cc" id="cc" value="checkbox" style="display:none;" />
<div style="width:22px; height:22px;background-image:url(checkOff.JPG);" onclick="myCheckbox('cc',this);"> </div>
</form>
[img]http://dl2.iteye.com/upload/attachment/0087/7573/174edc4c-8d95-3b81-a614-d80e5ad0e313.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0087/7575/e4bbb320-0af2-359e-9c0d-8807afa9af76.jpg[/img]