This repository is to store exercises from CS 7025 programming for digital media.
Lab1-5contain labs from the tutorial.lec1-10contain exercises from the lectures.- Lecture notes are WIP. They will be accessible in each fold as long as finished.
- hover
- click
- visit
// function something on clicking on the element
document.getElementById("id-of-the-element").addEventListener("click", function (ev) { })- It will switch to a random pic by clicking at the button.
- It is realized by a random number, not an array.
// Returns a random integer from 0 to 100:
Math.floor(Math.random() * 101);<img id="img-in-web" src="src/to/the/img" width=300 height=400>// Get the source of image in HTML
var imgSrc = document.getElementById("img-in-web").src