1
我試圖用聚合物動畫的網頁,但它是 在控制檯上返回一個錯誤:聚合物:綁定連接到核心動畫的頁面
Uncaught TypeError: Cannot set property 'selected' of null
這裏是代碼
<core-animated-pages id="pp" selected="0">
<section id="signin">
aa
<a href="/#" onclick="hi()">cc</a>
</section>
<section id="signup">
bb
</section>
<core-animated-pages>
<script>
function hi(){
var pp = document.getElementById('pp');
pp.selected='1';
}
</script>
</template>
<script>
Polymer({});
</script>