1
I need to get the Element Name only from the Element I clicked on, but when I look for the textContent all of the li 
<li class="folder folder-open Selected">
TesteNfseSPO
<ul>
    <li class="file">TesteNfseSPO.sln</li>
    <li class="folder">TesteNfseSPO
        <ul>
            <li class="file">TesteNfseSPO.csproj</li>
            <li class="file">Program.cs</li>
            <li class="file">app.config</li>
            <li class="folder">Properties
                <ul>
                    <li class="file">AssemblyInfo.cs</li>
                </ul>
            </li>
            <li class="folder">bin
                <ul>
                    <li class="folder">Debug
                        <ul>
                            <li class="file">NfseSPO.dll</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li class="folder">obj
                <ul>
                    <li class="folder">Debug</li>
                </ul>
            </li>
        </ul>
    </li>
</ul>
I would like for example when I click to get only the "Program.Cs" when I click on it, in all cases.
Are you using any javascript framework? or just pure javascript?
– Júlio Neto
Javascript Puro
– Andre Neto
In this case the only way that comes to mind (not pretty), is to create a function that gets the element clicked and in onclick call the function using this: <li onclick="clicked(this)" ...
– Júlio Neto
Update the answer with your javascript that will be easier to help you, André
– Vinícius
I haven’t made the Javacript yet, but this code I sent, will be generated via a DLL, so I can’t tag the onclick
– Andre Neto