【问题标题】:from webview to activity从网页浏览到活动
【发布时间】:2018-01-07 13:26:49
【问题描述】:

我在 webview 中有一个登录表单,我需要确保在输入正确的数据时,将用户定向到活动 MainActivity.java。

  $(function() {
  $('.submit').click(function(event) {
    event.preventDefault();
    var inp1 = $('#inp1').val();
    var inp2 = $('#inp2').val();
    var url = "";
    if (inp1 == 'exmp@mail.ru' && inp2 == 'exp111') {
      document.location.href =  url;
    } else {
      $('.err').html('incorrect!');
    }
  });
});


 <div class="log_in">
        <p class="err"></p>
        <input id="inp1" type="email" name="name" placeholder="mail" required><br>
        <input id="inp2"  type="password" name="pass" placeholder="pass" required><br><br><br>
        <a  class="submit"  href="">Login</a></div>

【问题讨论】:

标签: android android-activity webview


【解决方案1】:

我猜你可以使用 DeepLinks。 总之,您可以在 Url 中设置一些关键字,每当有人打开该链接时,您的 SELECTED Activity 就会打开。

检查:

https://developer.android.com/training/app-links/deep-linking.html

还有:

tutplus

【讨论】:

    猜你喜欢
    • 2016-12-30
    • 2023-02-01
    • 2019-12-03
    • 1970-01-01
    • 2012-12-28
    • 1970-01-01
    • 2011-02-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多