gpt4 book ai didi

javascript - 移除部分图片 src 属性

转载 作者:行者123 更新时间:2023-11-30 06:01:25 24 4
gpt4 key购买 nike

<img width="49" alt="[alternative text]" src="http://win-23ookphjfn0:80/sites/my/User%20Photos/Images%20du%20profil/WIN-23OOK_Administrateur_MThumb.jpg">

<img width="49" alt="[alternative text]" src="/sites/my/User%20Photos/Images%20du%20profil/WIN-23OOK_Administrateur_MThumb.jpg">

删除http://win-23ookphjfn0:80 的最佳方法是什么?在 src?Javascript 还是 JQuery?

我有不同的环境http://win-23ookphjfn0:80可以改变...

最佳答案

试试这个:

$(document).ready(function() {       $("img").each(function() {          $(this).attr("src", $(this).attr("src").replace("http://win-23ookphjfn0:80", ""));       });    });

希望对你有帮助

关于javascript - 移除部分图片 src 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8256712/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com