الاثنين، 15 يونيو 2015

جافا سكربت Java Script

المشاركة رقم:61
مشاركات متنوعة  Various Posts
جافا سكربت JAVA SCRIPT
_________________________________

حرك المؤشر هنا
mouse over here

- مثال بسيط  عن الجافا سكربت Java Script

في هذا المثال سنقوم بتطبيق الحدث (mouse over) والحدث (mouse out) على عنصر من عناصر html.

- Simple Example in Java Script
In this example we'll apply the event (mouse over) and the event (mouse out) on html element.
--------------------------------------------------------------
<!DOCTYPE html>
<head>
<title>Java Script</title>
</head>
<body>
<div id="div1" style="height:100px; width:200px; background-color:#0CF; cursor:pointer;" onmouseover="MyAction1(this)" onmouseout="MyAction2(this)">
</div>
<script type="text/javascript">
function MyAction1(x) {
x.style.backgroundColor="black";
}
function MyAction2(x){
x.style.backgroundColor="#0CF";
}
</script>
</body>
</html