title: How to get the value text from a QR code?
body: <p>I am trying to get the value text from my QR code (<code>myqr</code>). I have a submit button where the qr code is submitted. How do I get the value text from the qr code?</p>
  
  <pre class="lang-js prettyprint-override"><code>$(document).ready(function qr1() {
    var code = document.getElementById("qrdiv");
    code.textContent = qr;
    var text = code.textContent;
    $("#qr1").submit(function(c) {;
      c.preventDefault();
      var answer = $("#photo").val();
      if (answer === "myqr") {
        qr = 1;
        alert("YES!");
      } else {
        console.log("NO!");
      }
    });
  });
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div data-role="collapsible" data-collapsed="false"&gt;
    &lt;form id="qr1"&gt;
      &lt;div class="center"&gt;
        &lt;img id="image" class="media" /&gt;
      &lt;/div&gt;
      &lt;input id="photo" type="file" accept="image/*" capture="camera" /&gt;
      &lt;input type="submit" id="answerbtn1" value="submit1" /&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>