Difference between revisions of "Team:NAWI Graz/Resources/netlogo 1"

Line 6: Line 6:
 
<p>In this case JavaScript changes the src (source) attribute of an image.</p>
 
<p>In this case JavaScript changes the src (source) attribute of an image.</p>
  
<button onclick="document.getElementById('myImage').src='pic_bulbon.gif'">Turn on the light</button>
+
<button onclick="document.getElementById('my

Revision as of 16:47, 23 October 2017

What Can JavaScript Do?

JavaScript can change HTML attributes.

In this case JavaScript changes the src (source) attribute of an image.

<button onclick="document.getElementById('my