+ 1

Document.getElementById

document.getElementById("test").innerHTML = (l); document.getElementById("demo").style.backgroundImage = "url('http://cdn.bulbagarden.net/…/725Litten.…/600px-725Litten.png')"; is there a way to make this compact? like a shorter version.

7th Dec 2016, 7:42 PM
Juan Madrigal
Juan Madrigal - avatar
2 Antworten
+ 2
it is already short you can use jquery to make these commands more short
7th Dec 2016, 8:30 PM
Sandeep Chatterjee
+ 1
No (at least if you don't using any framework).
7th Dec 2016, 7:47 PM
Ondřej Doněk
Ondřej Doněk - avatar