How do I get the text node in this DOM element?

< div id="test" > asdfgh < span class="cancel-btn" > < / div >

how do you get only "asdfgh"" if you want to get it? You can use either jquery or native js. Thank you, guys. Thank you.


do you dare to tag him when you are typesetting? why do you have to mess with yourself


simple, fast, native.

  

var p = $("- sharptest"). Text ()
var c = $(".clients-btn"). Text ()
var I = p.lastIndexOf (c)
var r = p.slice (0, I)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b310d0-2bd58.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b310d0-2bd58.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?