GithubHelp home page GithubHelp logo

native-hybrid-h5's People

Contributors

lrenelidan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

ying123

native-hybrid-h5's Issues

APP端与H5交互问题

兼容 - ios系统keydown keyup事件不生效
解决方案://监听搜索

 $("input#searchkey").on("input",function(){
            var t_arry = $(this).val();
            console.log(t_arry);
            setTimeout(function () {
                // 请求相关操作
            }, 300);
        });

APP端与H5交互问题
安卓低版本系统(Android6.0以下)不支持es6语法(let const等),不会报错提醒

IOS与H5交互,用JSBridge
setupWebViewJavascriptBridge(function (bridge) {
    bridge.callHandler("getUserData", function (response) {
      var _data = response; //getUserData是ios定义的方法,供JS调用 
    })
  })

Android与H5交互,可直接相互调用方法,但JS调用原生APP需要定义一个公用的参数

var infodata = window.DataAnalysis.getAppInfo(); //DataAnalysis是安卓定义的公用的参数,getAppInfo是安卓的方法
  infodata = JSON.parse(infodata);

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.