How to get the value of an element

<a onclick="merchandiseCzc("/front/merchandise/detail/FDM/CAN003066G/",1, "", "CAN003066G", "","_blank")" class="u_goods_tit" title="/0.5g*12s*3 ">
                                                <span class="m_tag m_tag_kw">
                                                            OTC
                                                </span>

                                            
                                                <span class="u_goods_spec" >/0.5g*12s*3  </span>
                                            </a>

as in the code above, how does jQuery get only the value of element a, "Jianwei Xiaoshi tablet"? Boss, please give me some advice.

Apr.05,2021

the idea goes something like this:

//
var a = document.getElementById('aaa');
//dom
console.log(a.childNodes);
//a  
for(var i = 0; i < a.childNodes.length; iPP) {
    if(a.childNodes[i].nodeType === 3) {
        console.log(a.childNodes[i].nodeValue);
    }
}

//jQuery  
The html, value of

is troublesome. Why not consider adding a label to this value? It is convenient to take the value and add css modification. You can also add a key-value pair of attributes to the a tag to store this.

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-1b36b3a-2b7b1.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-1b36b3a-2b7b1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?