title: not show result details mysql in jquery
body: <p>the below code is <code>html</code> code:</p>
  
  <pre><code>&lt;input type="search" name="srchtxt" id="srchtxt"/&gt;
  &lt;div class="resultsearch"&gt;
      &lt;ul class="ul"&gt;&lt;/ul&gt;
  &lt;/div&gt;
  &lt;a href="#" id="srchbtn"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>and the below code is <code>jquery</code> code:</p>
  
  <pre><code>$("#srchtxt").keyup(function(){
      var addresshome = $("#srchtxt").val();
      $.post("addressfile",{address:addresshome},function(res){
          $(".ul").html(res);
      });
  });
  $(".ul li#item a").each(function(){
      $(this).click(function(e){
          e.preventDefault();
          var index_address,address;
          index_address = $(this).parent().index();
          alert(index_address);
          address = $(this).eq(index_address).attr("value");
          $("#srchtxt").attr("value",address);
      });
  });
  $("#srchbtn").click(function(){
      alert($("#srchtxt").val());
  });
  </code></pre>
  
  <p>and the below code is <code>php</code> code:</p>
  
  <pre><code>$address = $_POST['address'];$querysrch = "select city,state,bolv from table where city like '%".$address."%' or state like '%".$address."%' or bolv like '%".$address."%'";$ressrch = mysqli_query($cnt,$querysrch);if(mysqli_num_rows($ressrch) &gt; 0){
  while($row = mysqli_fetch_assoc($ressrch)){
      $addressres = $row['city']."-".$row['state']."-".$row['bolv'];
      echo "&lt;li id='item'&gt;&lt;a href='#' value='".$addressres."'&gt;".$addressres."&lt;/a&gt;&lt;/&gt;";
  }}else{    echo "&lt;li id='item'&gt;&lt;a href='#' value='not found'&gt;notfound&lt;/a&gt;&lt;/li&gt;";}
  </code></pre>
  
  <p>when result is show i can't access to value the <code>li</code> list for show value or insert to id="srchtxt"</p>