title: pass data using jquery $.get()
body: <p>I try to implement the following code:</p>
  
  <p>html</p>
  
  <pre><code>   &lt;span id = "myset"&gt;school&lt;/span&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>      var myset =$("#myset").val();
          var ID=$("#data li:last").attr("id");
      $.get('page.php', 'id='+ID+'&amp;set='+myset, function(newdata){
          $('#data').append(newdata);
  
      });
  </code></pre>
  
  <p>In the page.php file, it doesn't receive the value of the $_GET['set'], but if I change</p>
  
  <pre><code>      var myset =$("#myset").val();
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>       var myset ='school';
  </code></pre>
  
  <p>everything works fine in this case, what am I doing wrong, anyone could help me, thanks.
   I also tried </p>
  
  <pre><code>       var myset =document.getElementById("myset").value;
  </code></pre>
  
  <p>but it is still not working;</p>