السلام عليكم و رحمة الله وبركاته
عندي مشكلة بسيطة وهي جميع اكواد الجافا لا تعمل مع المتصفحات عند عرضه.
النتائج لا تظهر في المتصفح.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywoeds" content="HTML, CSS, XML, JavaScript">
<meta name="aithor" content="Ayman AlSehli">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="lgo/slogo.png">
</head>
<body>
<p> In this case JavaScript changes the value of the src (source) attribute of an image.</p>
<img id="lighbulb" onclick="changeImage()" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/93927/pic_bulboff.gif" wifth="200" height="360">
<p> Click the light bulb to turn of/off the light</p>
<script>
function changeImage() {
var image = document.getElementById('lighbulb');
if (imag = src.match("bulbon")) {
image.src = "https://s3-us-west-2.amazonaws.com/s.cdpn.io/93927/pic_bulboff.gif";
}
else {
image.src ="https://s3-us-west-2.amazonaws.com/s.cdpn.io/93927/pic_bulbon.gif";
}
}
</script>
</body>
</html>