So I have following string:
var s = '<span>Some Text</span> Some other Text';
The result should be a string with the content "Some other Text".
I tried...
var $s = $(s).not('span');
...and a lot of other stuff with remove()
, not()
, etc. but nothing worked.
Any suggestions? I could match the string with regex, but I prefer a common jQuery solution.
edit:
I do not search a solution with regex, I'm just wondering why this example does not work:
http://jsfiddle.net/q9crX/150/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…