Giter VIP home page Giter VIP logo

yourtion.github.io's Introduction

yourtion.github.io's People

Contributors

dependabot[bot] avatar yourtion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wangtaogithub

yourtion.github.io's Issues

图片LazyLoad

图片添加 Lazy Load 同时利用七牛进行裁剪显示

完成基于百度API的站内搜索

API:http://zn.baidu.com/cse/home

参考文档:http://bs.baidu.com/zhanzhang/Baidu_CommonAPI_Guide.pdf

调用方法:

var cse;

//处理结果回调函数示例
function display (data) {
console.log(data);
}

//初始化回调函数示例
function init() {
  cse = new BCse.Search("16341868562305064722"); //参数为您的API引擎ID,已自动填写,必需。

  cse.getResult("关键词", display); //此方法获取搜索结果,参数1为搜索词,参数2为您获取到结果后想要执行的回调函数。
}

function loadScript() {
  var script = document.createElement("script");
  script.type = "text/javascript";
  script.charset = "utf-8";
  script.src = "http://zhannei.baidu.com/api/customsearch/apiaccept?sid=16341868562305064722&v=2.0&callback=init";
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(script, s);
}

loadScript();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.