0

So I am trying to pass variables into Javascript through a websites URL. I have set this website up:

https://teamhaxor.000webhostapp.com/variabletest.html?test=contents

What this is is a file called "variabletest.html" and I am trying to pass the variable "test" with a value of "contents" into it. The code of this file is here:

<script>

alert(test)

</script>

The debug output says that the variable "test" is not defined. I don't understand why? Is it my web host not supporting variable passing?

Note: I have also tried putting quotes around the string.

0 Answers0