开发者

How i can delete img scr in the Javascript code above? [closed]

开发者 https://www.devze.com 2023-03-21 05:33 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.
    function quoteMess开发者_运维问答age(tekst, poster)
{
       var selected = getSel($('tekst'));
            if(selected.length > 0)
            {
        $('br').remove(); 
                $('tekst').value = $('tekst').value.replace(selected, '[quote=Bericht geplaatst door' + poster + ' "] ' + tekst + ' [/quote] ');
            }
            else
            {
                $('tekst').value += '[quote=Bericht geplaatst door: ' + poster + ' "] ' + tekst + ' [/quote]';
            }
            $('tekst').focus();      
        }

How i can delete img scr in the Javascript code above?


If the element is part of the dom you can remove that attribute by,

$(<someway to select image>).attr('src',"");


you can use

$("img").remove();

or

img with id

$("#img_id").remove();

I'm not sure if this is what are you looking for but your question is quite hard to understand

In your case:

$("#img [alt='smiley']").remove();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号