1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>CheckBox personamlisées</title>
<style type='text/css'>
.checkbox_checked {
background: white url('checked.gif') no-repeat;
padding: 0px 5px 5px 25px;
font-family:verdana;
font:12px;
display: block;
margin: 0px;
position: absolute;
z-index:10;
}
.checkbox_unchecked {
background: white url('unchecked.gif') no-repeat;
padding: 0px 5px 5px 25px;
font-family:verdana;
font:12px;
display: block;
margin: 0px ;
position: absolute;
z-index:10;
}
</style>
<script type='text/javascript'>
function Warp(obj){
obj.className=(obj.className=='checkbox_unchecked')?'checkbox_checked':'checkbox_unchecked';
}
</script>
</head>
<body><br/>
<div style="position:absolute;top:100px; left:300px;width:200px;">
<label id="label_1" for='checkbox_1' class="checkbox_unchecked" onclick="Warp(this)">Ceci est en fait un label</label>
<input name="checkbox_1" id="checkbox_1" type="checkbox" style="positon:absolute;top:0em;left:0em;z-index:1;" />
</div>
<br/><br/>
<input type="button" onclick="alert(document.getElementById('checkbox_1').checked)" value="verifie le check" />
</body>
</html> |
Partager