微信页面阻止android回退键退出
2015-12-31 10:10
597 查看
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <html> <meta charset="utf-8" /> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <head> <script src="//cdn.bootcss.com/jquery/3.0.0-alpha1/jquery.js"></script> <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script> </head> <script type="text/javascript"> $(function(){ $(window).bind('hashchange', function(e) { $('#urldisplay').html(window.location.hash); window.history.forward(1) //alert(2); }); var urlindex=1; $('#btn_hash').on('click',function(){ window.location.hash ='#c_'+ (++urlindex); }); $('#btn').on('click',function(){ alert(1); WeixinJSBridge.invoke('closeWindow', {}, function(res) {}) }); }); </script> <body>asdasdasd <input id="btn" type="button" value="aaaa"/> <input id="btn_hash" type="button" value="hash"/> <div id="urldisplay"></div> </body> </html>
相关文章推荐
- 微信调用jssdk在网页端实现调用扫一扫,java+jsp
- 微信开发之接入
- 突击部队拼多多
- php实现微信公众号主动推送消息
- 微信JS SDK PHP Demo
- 微信开发之网页授权获取用户基本信息
- 微信分享提示未安装
- 微信开发中网页授权access_token与基础支持的access_token异同
- php实现微信拼手气红包
- 微信自动回复功能开发总结
- 微信支付接入遇到的问题
- 微信公众号接收消息和发送消息开发流程和注意事项
- iOS 微信分享
- 关于微信支付,支付宝支付与银联支付的异步消息状态
- 安卓仿微信朋友圈动态数据加载(包括评论和点赞,以及动态详情页)
- 搜狗微信公众号文章抓取
- IOS版添加phonegap--微信授权插件教程
- 友盟 微信第三方登录-返回成功却提示服务器繁忙
- Android版添加phonegap--微信授权插件教程
- 微信公众号图文信息发布的六个细节