When you click on the picture, this code is modalImg.src = this.src; Everything works and displays the desired resource. I need that I pulled out the value of the block tag in which this picture lies. That's how it lies in the console.
<div name="3" id="carouselRow30" class="carousel-item active"> <img name="imgPost" class="w-100 myImgClass col-md-4"src="/Content/Files/15.08.2018/20055/114176096_d1.jpg" alt=""> </div> I need to write to the variable the value of the tag Name where in this case lies the "3". When you press the code responds and records the correct picture, then you can somehow pull out the element above this picture. How?