Enter your gmail id & password & make login
- Then click on add button :
- 3. After that enter your site URL for example
https://www.phpdevelopemnttricks.blogspot.com and select language and enter name of search engine then click on Create ..
4. Then your will for following to get your code :
5. After click on Get code you will see following code just copy and paste inside your <div > tag where you want to display search engine box ..
6. Here is the sample html code for example :
<html>
<body>
<div>
<script>
(function() {
var cx = '013461944738121217145:ogsz8ox40jm';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
</body>
</html>
output :
0 comments:
Post a Comment