Splitting an html tags

后端 未结 2 1034
你的背包
你的背包 2021-01-29 14:25
\"Hi HElP ME

ok

&
相关标签:
2条回答
  • 2021-01-29 14:39

    Looks like your id selector is referenced incorrectly. It should be $("#1") instead of $("#id1").

    Easy mistake to make, but hard to find.

    0 讨论(0)
  • 2021-01-29 14:55
    $('#id1').find('img').each(function(index){
    
    
    var split_text = $(this).html().split(/<img[^>]*>/)[index];
    alert(split_text)
    });
    
    0 讨论(0)
提交回复
热议问题