<P class="text">リンク元のデータ「boowy」の値は「<span id="thisreferer"></span>」です。</P>

    <form action="php/form.php" method="post" id="test" name="test">
      <dl>
        <dt>名前</dt>
        <dd>
          <input type="text" name="名前" id="name">
        </dd>
      </dl>
      <dl>
        <dt>E-mail</dt>
        <dd>
          <input type="text" name="E-mail" id="e-mail">
        </dd>
      </dl>
      <dl>
        <dt>URL</dt>
        <dd>
          <input type="text" name="URL" id="inputurl">
        </dd>
      </dl>
      <dl>
        <dt><!--ローカルストレージ--></dt>
        <dd>
          <input type="hidden" name="referer" id="inputreferer">
        </dd>
      </dl>
      <input type="submit" value="送信する">
    </form>
var referer = localStorage.getItem('boowy');
  document.getElementById("thisreferer").innerHTML = referer;
  document.getElementById("inputreferer").value = referer;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.