天天看點

YouTube instant key code

 Firstly, search the suggestion words array from google:

var the_url = 'http://suggestqueries.google.com/complete/search?hl=en&ds=yt&client=youtube&hjson=t&jsonp=window.yt.www.suggest.handleResponse&q='+encodeURIComponent(searchBox.val())+'&cp=1';

$.ajax({

type:

"GET",

url: the_url,

dataType:

"script"

});

Secondly, load video from youtube videos api:

type: "GET",

"jsonp",

success:

function(responseData, textStatus, XMLHttpRequest) {

if (responseData.data.items) {

updateVideoDisplay(responseData.data.items);

}

else {

updateSuggestedKeyword(

'No results for "'+keyword+'"');

doneWorking();

others is something typing call real time states changing.

上一篇: C# 3

繼續閱讀