Ajax数据错误

I have a error on ajax data:value see my code

   <script>
$(document).ready(function(){
$("#pros").change(function(e){
 e.preventDefault()
var value = $("#pros").val();
$.ajax({
   type: "GET",
   url: "product.php",
  dataType: "html",
   data: value,
   success: function(msg){
     $("#products").html(msg);
   }
   });
 });
      });
</script>

when i pass the value to product page then when i echo I get error Undefined index: value product.php on line 2 product.php page

$q = $_GET['value'];
echo $q;

You have to send an hash:

$.ajax({
   type: "GET",
    url: "product.php",
    dataType: "html",
    data: { 'value' : $("#pros").val() },
    success: function(msg){
        $("#products").html(msg);
    }
});

Notice { 'value' : $("#pros").val() }.

$(document).ready(function () {
    $("#pros").on('change', function (e) {
        e.preventDefault()
        $.ajax({
            type: "GET",
            url : "product.php",
            dataType: "html",
            data: {value: this.value} //key / value
        }).done(function(msg) {
            $("#products").html(msg);
        });
    });
});
<script>
$(document).ready(function(){
   $("#pros").change(function(e){
     e.preventDefault()
     var value = $("#pros").val();
     $.ajax({
       type: "GET",
       url: "product.php",
       dataType: "html",
       data: {'value':value},
       success: function(msg){
          $("#products").html(msg);
       }
     });
   });
 });
</script>