/********************************************************************* * JS modifies the text in the label without affecting the label * Description: * Required Modify the display text content in the <a> tab, but the <a> tab also has a label. * * 2017-8-28 Shenzhen Longhua gen Zengjianfeng ************************************************************* *******/First, reference documents:1.Gettext node of an element https://stackoverflow.com/questions/6520192/get-text-node-of-an-elementSecond, example:<a href="#" class="Dropdown-toggle lang_demo_analysis"data-toggle="dropdown"Aria-expanded="true">demo_analysis<strongclass="Caret"></strong> </a>second, the treatment method:1. $('. Lang_demo_analysis')[0].childnodes[0].nodevalue2. $('. Lang_demo_analysis')[0].childnodes[0].nodevalue ="ZENGJF"
JS modifies the text in the label and does not affect the label