微信的js接口目前已公布了三种:右上角按钮/底部导航栏/用户网络状态,另外转发到朋友圈和分享到好友也可以使用js接口来定义。
而关闭微信浏览器可以使用
weixinjsbridge.call('closewindow');"
在html中的调用演示如下:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <title>微信js</title> <meta content="text/html; charset=utf-8" http-equiv=content-type> <meta name=viewport content="initial-scale=1, user-scalable=no"> </head> <body> <input type="button" value="关闭本窗口" onclick="weixinjsbridge.call('closewindow');" /> <body> </html>
以上就是微信公众平台开发关闭微信浏览器的详细内容。
