JSFiddle - React, Tailwind, and code Playground
HTML
<script>
function func1() {
console.log('func1');
}
</script>
<input type="text" id="foo" onfocus="func1()">
<script>
function func1() {
console.log('func1');
}
</script>
<input type="text" id="foo" onfocus="func1()">