Skip to content
Advertisement

How do I make this Javascript function run?

I’m trying to make an image captcha from scratch for a small project, but in the code below, I can’t seem to manage to run the upRAns() function, I can’t find the proper syntax anywhere. Any help?

JavaScript

Advertisement

Answer

A <script tag cannot have both a src attribute (telling it to load the script content from a separate file) and some inline content within the block itself.

You can simply define two separate <script tags instead:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement