我有以下代码似乎无效。
我希望按钮2在点击Twitter后立即启用,并关闭Twitter弹出页面。
如何启用按钮2的当前代码?
非常感谢,
Appsboss7
代码:
<html>
<head>
<script>
function enableButton2() {
document.getElementById("button2").disabled = false;
}
</script>
</head>
<body>
<a href="https://twitter.com/BlackShellMedia" class="twitter-follow-button" data-show-count="false">Follow @BlackShellMedia</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<input type="button" id="button2" value="button 2" disabled />
<script>
$( document ).ready(function() {
$( '#BlackShellMedia' ).click(function() {
enablebutton2();
});
});
</script>
</body>
</html>