2、放置 QQ 登录按钮
这里有两种常用的方式
① 弹小窗
1. <script>
2. function openWin(url,name,iWidth,iHeight) {
3. //获得窗口的垂直位置
4. var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
5. //获得窗口的水平位置
6. var iLeft = (window.screen.availWidth - 10 - iWidth) / 2;
7. window.open(url, name, 'height=' + iHeight + ',innerHeight='
+ iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',top='
+ iTop + ',left=' + iLeft + ',status=no,toolbar=no,menubar=no,locati
on=no,resizable=no,scrollbars=0,titlebar=no');
8. }
9. function qqLogin() {
10. var url = "https://graph.qq.com/oauth2.0/authorize?response
_type=code&client_id=11111111&redirect_uri=http://localhost:8080
/oauth/qq/callback&scope=get_user_info";
评论0