Well, my problem is that I want to activate an action on a label, but it marks me an error and I do not know because if everything is as it should work.
Label
<a onclick="can();">Cancelar</a>
Function of .js
<script type="text/javascript">
function can() {
alert("Hola mundo");
}
</script>
The error is as follows:
I am developing on the programming language "Ruby on Rails" and the .js is inside my .html.erb file which is where I have my form.