如何用ajax / jquery 清除image src

日期:2019-07-15 14:54:28 人气:1

如何用ajax / jquery 清除image src

需要准备的材料分别有:电脑、html编辑器、浏览器。 1、首先,打开html编辑器,新建html文件,例如:index.html,并引入jquery。 2、在index.html中的标签,输入jquery代码:$('img').attr('src', '');。 3、浏览器运行index.html页面,此时成功用jquery清除了img的src属性。
    A+
热门评论