JS function called when image is selected | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 9

JS function called when image is selected

Hi, Please help me: I need function, that is called when the image is selected. I´ve tryed this: //CSS #image::selection{ width: 100px; //changed } //JavaScript document.getElementById("image").onresize = function(){/*stg*/} ...but it doesn´t work.

5th Dec 2019, 6:21 PM
Dominik Vladař
Dominik Vladař - avatar
1 Answer
5th Dec 2019, 6:40 PM
Sarthak
Sarthak - avatar