JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div class = "1">
<ul>
<button onclick="f(this)">Текст</button>
</ul>
</div>
</body>
JavaScript
function f(e){
alert("result");
}
<body>
<div class = "1">
<ul>
<button onclick="f(this)">Текст</button>
</ul>
</div>
</body>
function f(e){
alert("result");
}