[Solved] Uncaught TypeError: Cannot set property ‘src’ of null while changing SRC of img [closed]
Looking at your code you do: var names = (“1200voc”) then try to access names as an array. So this: for (x = 0; x < names.length; x++) { var prof = document.getElementById(names[x]); prof.src=”https://stackoverflow.com/questions/48342902/engine/images/proffesion/” + names[x] + ‘.png’; } Means that names[0] will return 1, names[1] will return 2, names[2] will return 0 and so … Read more