jQuery add image inside of div tag

前端 未结 6 2215
北荒
北荒 2020-11-29 18:02

I have a div tag

Where is the image?

I would like to add an image tag inside of the div

End re

6条回答
  •  有刺的猬
    2020-11-29 18:24

    var img;
    for (var i = 0; i < jQuery('.MulImage').length; i++) {
                    var imgsrc = jQuery('.MulImage')[i];
                    var CurrentImgSrc = imgsrc.src;
                    img = jQuery('');
                    img.attr('src', CurrentImgSrc);
                    jQuery('.YourDivClass').append(img);
    
                }
    

提交回复
热议问题