自从在我的Mac上安装Anaconda以来,术语“蟒蛇”和“蟒蛇”都是和' python3'启动python 3.5.1 Anaconda解释器,尽管我也安装了2.6和2.7(好吧,它们预装在mac上)。 到目前为止,我一直在python 3中学习奇数位,但我已经开始了一个需要2.7的课程,所以我需要知道如何使用它。
我知道正确的菜鸟问题,但我是菜鸟......
答案 0 :(得分:1)
输入 var done = false;
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING && !done) {
var element = document.getElementById("dim")
element.style.backgroundColor = 'rgba(0, 0, 0, 0.6)';
done = true;
}
}
并点击<div id="dim>
<div id="player"></div>
<script>
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '390',
width: '640',
videoId: 'XGSy3_Czz8k',
events: {
'onStateChange': onPlayerStateChange
}
});
}
var done = false;
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING && !done) {
var element = document.getElementById("dim")
element.style.backgroundColor = 'rgba(0, 0, 0, 0.6)';
done = true;
}
}
function stopVideo() {
player.stopVideo();
}
</script>
</div>
如果你想知道路径
尝试python2.7
,例如:
Enter