App notification popup mobile device web browser

后端 未结 1 1358
执念已碎
执念已碎 2021-01-06 12:24

Not really sure how to correctly describe this so hopefully some of you know what I mean.

Our client is getting a mobile app for thier site, hopefully soon, and I ha

相关标签:
1条回答
  • 2021-01-06 13:08

    Using some infor from a java push trigger as well as a few other Stacks I put this together.

    <script type="text/javascript">
      if( /Android|iPhone|BlackBerry/i.test(navigator.userAgent) ) {
      var url=confirm("Would you like to download our mobile application?");
        if (url==true)
      {
        var url = window.location.href = 'http://www.google.com';
        url.show(); 
      }
        else
      {
    
      }
      }
      </script>
    

    Will test for the 3 devices mentioned, if so will create a confirmation box for which confirmation will direct the user to another url.

    0 讨论(0)
提交回复
热议问题