Avatar of Monroe406
Monroe406

asked on 

Using a global variable within HTML <body> section

I wish to insert a predefined (global) URL somewhere in a HTML file which can then be used elsewhere in the <body> section of the HTML file. Example:

<html>
<head>
</head>
<!-- define a global string somewhere before the body tag -->
<!-- Example:  GlobalURL = "http://mysite.com/aurl.htm" -->
<body>
<p>
I then wish to insert the <a href="%GlobalURL%">URL here</a>
</p>
</body>
</html>

Open in new window


How can I do this?
HTMLJavaScript

Avatar of undefined
Last Comment
Leonidas Dosas

8/22/2022 - Mon