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>
<title></title>
<style type="text/css">
<!--
.style1{
color: #000000;
border: #AAAAAA 2px ridge;
font-family: Arial;
font-size: 10pt;
padding: 2px;
width: 150px;
}
.style2{
color: #FFFFFF;
background-color: #000000;
border: #AAAAAA 2px ridge;
font-family: Times New Roman;
font-size: 12pt;
padding: 5px;
width: 150px;
}
//-->
</style>
<script type="text/javascript">
<!--
function changeStyle()
{
document.getElementById("idDiv").className = "style2";
}
//-->
</script>
</head>
<body>
<div id="idDiv" class="style1">bla bla bla bla bla bla bla
</div>
<br><br>
<input type="button" value="autre style" onclick="changeStyle()">
</body>
</html> |
Partager