title: How to get value by form input name through javascript when no formDd or inputID exists?
body: <p>Let's say I have the following HTML:</p>
  <pre><code>&lt;form method=&quot;POST&quot; action=&quot;https://localhost:4442/my-profile/updateField?1557&quot; accept-charset=&quot;UTF-8&quot; class=&quot;js-form--update-field-onchange &quot; autocomplete=&quot;off&quot;&gt;&lt;input name=&quot;_method&quot; type=&quot;hidden&quot; value=&quot;PATCH&quot;&gt;&lt;input name=&quot;_token&quot; type=&quot;hidden&quot; value=&quot;123456789&quot;&gt;
  </code></pre>
  <p>And <strong>without</strong> changing the HTML, I want to retrieve the unique and rotating value <code>123456789</code> within <code>&lt;input name=&quot;_token&quot; type=&quot;hidden&quot; value=&quot;123456789&quot;&gt;</code>.</p>
  <p>I was considering <code>getElementByName();</code> or <code>getElementById();</code>, however as seen in the above HTML. There is no <code>getElementByName();</code> or <code>getElementById();</code> reference within the input form. How can I go about retrieving this <code>_token</code> value in JavaScript?</p>
  <p>Your help is much appreciated!</p>