各位大神帮我看看,script哪里出问题,显示不了下拉提示框
<script>
$('#search-input').bind('keyup', function() {
var searchText = $('#search-input').val();
$.get('http://api.bing.con/qsonhs.aspx?q=' + searchText, function(d) {
var d = d.AS.Results[0].Suggests;
var html = ''
for(var i = 0; i < d.length; i++) {
html += '<li>' + d[i].Txt + '</li>';
}
$('#search-result').html(html);
$('#search-suggest').show().css({
top: $('#search-form').offset().top + $('#search-form').height()+10,
left: $('#search-form').offset().left,
position: 'absolute'
});
}, 'json');
});
})
</script>