问题描述:

The following seems to work in Firefox & Chrome, but NOT in Internet Explorer (11) - where it does not want to display the facebook "Share" button... please help:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv=Content-Type content="text/html; charset=utf-8" />

</head>

<body>

<div id="fb-root"></div>

<script>

window.fbAsyncInit = function() {

FB.init({appId : '421773064573783', status : false, cookie : true, xfbml : true});

};

(function(){

if (document.getElementById('facebook-jssdk')) {return;}

var fjs = document.getElementsByTagName('script')[0];

var js = document.createElement('script');

js.id = 'facebook-jssdk';

js.src = '//connect.facebook.net/en_US/all.js';

fjs.parentNode.insertBefore(js, fjs);

}());

function clickProceed() {

document.getElementById('DIV1').style.display = 'none';

document.getElementById('DIV2').style.display = 'inline';

}

</script>

<div id="DIV1" style="display:inline;">

Click to proceed:

<input type="button" value="Proceed" onClick="clickProceed();"></input>

</div>

<div id="DIV2" style="display:none;">

Click to share:

<div class="fb-share-button" data-href="http://www.stackoverflow.com"

data-width="500" data-type="button_count"></div>

</div>

</body>

</html>

相关阅读:
Top