I want to add JavaScript attribute “onclick” with “go to” function inside a “span” tag: onclick=”GoTo(‘URL’) to a post on WordPress website.

When I add this code to a post: 

```
<span class="aff" onclick="GoTo('URL')" target="blank">text</span>

```

nothing happens when you click on the "text" and there is an error “Uncaught ReferenceError: GoTo is not defined at HTMLSpanElement.onclick” at the console.

Please, help to fix the issue.