JavaScript İle Lamba Kontrol - Fun For Code

JavaScript İle Lamba Kontrol

GÖRÜNÜŞÜ

JavaScript İle Lamba Kontrol 1

ÖRNEK HTML KODLAMASI;

<!DOCTYPE html>
<html>
<body>

<h2>What Can JavaScript Do?</h2>

<p>JavaScript can change HTML attribute values.</p>

<p>In this case JavaScript changes the value of the src (source) attribute of an image.</p>

<button onclick=”document.getElementById(‘myImage’).src=’pic_bulbon.gif'”>Turn on the light</button>

<img id=”myImage” src=”pic_bulboff.gif” style=”width:100px”>

<button onclick=”document.getElementById(‘myImage’).src=’pic_bulboff.gif'”>Turn off the light</button>

</body>
</html>

4 Comments

  1. Lloyd Budd 26 Mart 2014 Reply
    • Cobus Bester 26 Mart 2014 Reply
  2. Alex Shiels 26 Mart 2014 Reply
  3. Joseph Scott 26 Mart 2014 Reply

Leave a Reply