0

为什么这不适用于 avgRent?YQL 控制台使用以下语句提供一个值:

select * from html where url="http://www.zillow.com/widgets/zestimate/ZestimateSmallWidget.htm?did=zillow-shv-small-iframe-widget&type=iframe&forRent=true&address='5894+Dogwood+Cir+35111'" and xpath='//span[@id="zestimate-value"]'

但是我的代码不会返回值。我可以对变量 avgRent 做错什么吗?

var postcode = $('#postcode').val();
            var address = $('#address').val();


            $.get(makeUrl('http://www.zillow.com/widgets/zestimate/ZestimateSmallWidget.htm?did=zillow-shv-small-iframe-widget&type=iframe&forRent=true&address=5894+Dogwood+Cir&csz=35111'),
                    function(data) {
                        var context = $('<div />').html($(data).find('content').text  ());

                        $('#avgRent').html($(context).find('span.zestimate-value').text());

                    });

                <tr>
    <td><strong>Average Monthly Rent: </strong></td>
                <td><div id="avgRent"></div></td>
            </tr>
4

0 回答 0