【发布时间】:2014-05-13 16:09:52
【问题描述】:
<a href="#" id="signinFace" >Sign in With Facebook</a>
<script type="text/javascript">
$(document).ready(function () {
$("#signinFace").click(function () {
$(this).attr('href', 'https://www.facebook.com/dialog/oauth/?client_id=' +
'5649219384156&' +
'redirect_uri=http%3A%2F%2Flocalhost%3A4151%2FMainPage.aspx&' +
'response_type=code&' +
'scope=email,user_birthday,user_location&' +
'display=popup')
});
});
当我clickSign in With Facebook时,我应该怎么做,新页面会在一个新的小标签上打开?我认为帽子display=popup 就足够了。但它是在同一个窗口中打开的。我也试过 <a href="#" id="signinFace" target="_blank" ></a> ,但没有任何改变。
【问题讨论】:
-
尝试点击链接两次,因为您在第一次点击时更改了
href属性。所以我的意思是你的代码不正确。
标签: javascript asp.net href