# Displaying passed variable in HTML

**URL:** <https://forum.kirupa.com/t/displaying-passed-variable-in-html/292788>\
**Category:** web dev\
**Created:** [July 19, 2009, 4:29am UTC](https://forum.kirupa.com/t/displaying-passed-variable-in-html/292788 "2009-07-19T04:29:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [July 19, 2009, 4:29am UTC](https://forum.kirupa.com/t/displaying-passed-variable-in-html/292788/1 "2009-07-19T04:29:04Z")

</div>

I’ve forgotten how to do this, so I have to ask the newbie question:  
How do I get JS to print a variable passed between pages?

First page link:

```auto

<p style="font-weight:bold;"><a href="event_registration.html?EventName=Vallejo">Register for this Event</a></p>

```

Receiving page:

```auto

<h1><script language="JavaScript1.2" type="text/javascript">document.write('$EventName' + " ");</script>Event Registration</h1>

```
