Display current month on a page
<p>I currently have the following script located in my .cshtml file:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    var d = new Date();
    var month = d.getMonth;

    window.onload = function () {
        document.getElementById("currentMonth").innerHTML = month;
    }
&lt;/script&gt;
</code></pre>

<p>Now, I would like to access currentMonth inside of my span here:</p>

<pre><code>&lt;span style="font-size: 250%; color:red;"&gt;CURRENTMONTH HERE&lt;/span&gt;
</code></pre>

<p>How do I do I access my javascript variable in plain text inside <code>&lt;span&gt;</code> or am I going about this the wrong way? </p>

<p>What I am trying to accomplish is to display the current month in string format inside of the span. I have tried using <code>@HttpContext.Current.Timestamp.Month</code> as well and this prints a 2 to the screen but the <code>ToString()</code> for it does not work. I have never used Javascript before so please go easy.</p>