Mouseevents using inline Javascript
I need an example where i can use inline Javascript functions for mouse events
Add Comment
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Mouse Events</title>
<style type="text/css">
p{
width:150px;
height:40px;
background-color:#efefef;
}
</style>
<script type="text/javascript">
function testScript(){
cc = document.getElementById('demo');
}
function sruthiMover(){
cc.style.backgroundColor ="#ffff00";
}
function sruthiMout(){
cc.style.backgroundColor ="#ff0000";
}
function sruthiClick(){
}
</script>
</head>
<body onLoad="testScript()">
<p id="demo" onMouseOver="sruthiMover()" onMouseOut="sruthiMout()" onClick="sruthiClick()">sdfasdgsadfsd</p>
</body>
</html>