first situation:
<span id="username" onclick="alert(this.innerHTML);">[Василий]</span>
after click on text "[Василий]" i see text in dialog window "[Василий]". OK. But in second situation when I'd written code below I saw "undefined", why?
<script type="text/javascript" charset="utf-8">
function func() {
alert(this.innerHTML);
}
</script>
<span id="username" onclick="func();">[Василий]</span>