First thing to do is -- just go to YouTube website and view the source of webpage and
search for <form, though it is clumsy and real tough to find the right code exactly needed for search. you can see the code similar to the one shown below.
<form id="search-form" action="/results" method="get" name="searchForm">
<input
id="search-term" name="search_query" type="text"
onkeyup="goog.i18n.bidi.setDirAttribute(event,this)" value=""
maxlength="128" />
<select class="search-type" name="search_type">
<option value="">Videos</option>
<option value="search_users" >Channels</option>
</select>
<input id="search-button" type="submit" value="Search" />
</form>
Just by removing the unnecessary code that is not at all required to us we can simplify the above code to<form action="/results" method="get">
<input name="search_query" type="text" maxlength="128" />
<select name="search_type">
<option value="">Videos</option>
<option value="search_users">Channels</option>
</select>
<input type="submit" value="Search" />
</form>
Now just replace form attribute action="/results" to action="http://www.youtube.com/results"
<form action="http://www.youtube.com/results" method="get">
To open the results in a new tab or window add attribute target="_blank"
<form action="http://www.youtube.com/results" method="get" target="_blank" >
Complete code:
<form action="http://www.youtube.com/results" method="get" target="_blank" >
<input name="search_query" type="text" maxlength="128" />
<select name="search_type">
<option value="">Videos</option>
<option value="search_users">Channels</option>
</select>
<input type="submit" value="Search" />
</form>
Output:
Thank you.
Iam not getting ads for my blog even my blog is more older than six months and i have enabled "show ads on my blog" But no ads at all why? please give a solution for this.
ReplyDeleteLink to adsensense account
DeleteWww.viraltvvideos.com
I think this is a really good article. You make this information interesting and engaging. You give readers a lot to think about and I appreciate that kind of writing.
ReplyDeleteSearch Button
Assign the correct category to your video also to make it easier for people to find. These are pretty important because it is the way YouTube uses to filter through the many videos that are held. There are millions there and categories will help to speed searches up.
ReplyDeleteYouTube Abonnenten kaufen
Very good post. It's helpful.But I need YouTube search results on my blog.
ReplyDeleteHow can I do that job ?
Did you ever figure this out? I'm trying to do the same thing
DeleteOk http://islamm1.wapka.mobi
ReplyDeleteAnd what if I want to get the top 10 results in my own site..?
ReplyDeleteDid you ever figure out how to do that?
Deletenice code
ReplyDeletesubscribe my youtube channel New/Rap/Song 2019
ReplyDeleteI know this is a super old post but I am trying to do something exactly like this, but instead of the target going to a separate page I need it to go to a div on my page. Is this possible?
ReplyDeleteThis is fuckin awesome!!
ReplyDeleteThank you very much