Javascript jQuery find()提供jQuery.ajax响应数据的未定义值,而不是表元素

Javascript jQuery find()提供jQuery.ajax响应数据的未定义值,而不是表元素,javascript,jquery,ajax,Javascript,Jquery,Ajax,我试图通过ajax调用从查询中获取数据。当我编写console.log(数据)时,它给出了完整的html页面。但当我尝试jQuery(data.find('table')时,控制台中给出了未定义的结果 我尝试过以下代码: <html> <head> <script src="js/jquery-1.11.3.min.js" type = "text/javascript"></script> <script> jQuery(docume

我试图通过ajax调用从查询中获取数据。当我编写console.log(数据)时,它给出了完整的html页面。但当我尝试jQuery(data.find('table')时,控制台中给出了未定义的结果

我尝试过以下代码:

<html>
<head>
<script src="js/jquery-1.11.3.min.js" type = "text/javascript"></script>
<script>
jQuery(document).ready(function(){
    jQuery.ajaxPrefilter( "json script", function( options ) {
            options.crossDomain = true;
        });
    jQuery("#searchbtn").click(function(){
        var url = 
        jQuery.ajax({
            dataType: "html",
            url: "http://cors.io/?u=http://www.netmeds.com/searchdrug?keyword=albuterol&product=All%20Drugs",
            success: function( data ) {
                //var html = jQuery(data);
                var req_table = jQuery(data).find('table');
                console.log(data);  // works good
                console.log("req_table : "+req_table); // not working
        }
    });
    });

});
</script>
</head>
<body>
<input type = "text" name="product" id = "product"/>
<input type = "button" name ="btn" value ="Search" id = "searchbtn"/>
</body>
</html>

jQuery(文档).ready(函数(){
ajaxPrefilter(“json脚本”,函数(选项){
options.crossDomain=true;
});
jQuery(“#searchbtn”)。单击(函数(){
变量url=
jQuery.ajax({
数据类型:“html”,
url:“http://cors.io/?u=http://www.netmeds.com/searchdrug?keyword=albuterol&product=All%20Drugs",
成功:功能(数据){
//var html=jQuery(数据);
var req_table=jQuery(data).find('table');
console.log(数据);//工作正常
console.log(“req_table:+req_table);//不工作
}
});
});
});

console.log(数据)的作用是什么;登录控制台?我在您的html中找不到任何表节点response@AmitSingh它在cosole中提供了完整的html页面源代码。你们能在小提琴上模拟一下吗?难怪你们找不到表。