0
Can you use javascript functions to return values to use in HTML?
I canât really explain, so I attached a code https://code.sololearn.com/Wv9VORvMZyJW/?ref=app
2 Answers
+ 3
https://code.sololearn.com/W84sj58fnaOn/?ref=app
you need to use 'onload' event (directly on img tag)...
however, you could do it by css:
style="width:100vw;height:100vh;"
or through css background image on another element if you want to preserve aspect ratio ;)
0
thank you, just what i was looking for