How can I escape a DOM name in javascript?
<p>I have a form element that I want to address via javascript, but it doesn't like the syntax.</p>

<pre><code>&lt;form name="mycache"&gt;
  &lt;input type="hidden" name="cache[m][2]"&gt;
</code></pre>

<p>I want to be able to say:</p>

<pre><code>document.mycache.cache[m][2]
</code></pre>

<p>but obviously I need to indicate that <code>cache[m][2]</code> is the whole name, and not an array reference to <code>cache</code>.  Can it be done?</p>
