Сообщение от skrudjmakdak
|
что то подобное
|
Оно?
<!DOCTYPE html>
<html>
<head>
<!--
<script src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" type="text/css" href="tmp.css" />
-->
<style type="text/css">
div {
width: 200px;
height: 30px;
background-color: green;
}
</style>
<script type="text/javascript">
function mouseover(ths) {
ths.style.background = (ths.className=='on') ? 'silver' : 'blue';
};
function mouseout(ths) {
ths.style.background = 'green';
};
function mousedown(ths) {
ths.style.background = 'silver';
};
function mouseup(ths) {
ths.style.background = 'blue';
ths.className='on';
};
</script>
</head>
<body>
<div onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);">Жмакай меня полностью!</div>
</body>
</html>