如何使用类在jquery中提供图像路径并更改图像大小 [英] How to give image path in jquery with class and change image size
本文介绍了如何使用类在jquery中提供图像路径并更改图像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
how to give image path in jquery with class and change image size
我尝试过:
actual_path_marker [j] .setIcon(image / our-new-pin.PNG); size = 10 class =img
What I have tried:
actual_path_marker[j].setIcon("image/our-new-pin.PNG"); size=10 class ="img"
推荐答案
试试这个
try this
var imageUrl = 'your url of the image'
(' 。img')。attr ( src,imageUrl);
('.img').attr("src", imageUrl);
(' 。img')。css({' height':' 100px',< span class =code-string>' width':' 100px'});
('.img').css({ 'height': '100px', 'width': '100px' });
这篇关于如何使用类在jquery中提供图像路径并更改图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文