Polymer 聚合:将链接绑定到核心动画页面

Polymer 聚合:将链接绑定到核心动画页面,polymer,Polymer,我试图使用聚合物动画页面,但它是 在控制台上返回错误: Uncaught TypeError: Cannot set property 'selected' of null 这是密码 aa bb 函数hi(){ var pp=document.getElementById('pp'); pp.selected='1'; } 聚合物({}); 这对我很有用。注意:所选应设置为整数索引,而不是字符串 aa bb 函数hi(){ var pp=document.getElementB

我试图使用聚合物动画页面,但它是 在控制台上返回错误:

 Uncaught TypeError: Cannot set property 'selected' of null
这是密码


aa
bb
函数hi(){
var pp=document.getElementById('pp');
pp.selected='1';
}
聚合物({});

这对我很有用。注意:
所选
应设置为整数索引,而不是字符串


aa
bb
函数hi(){
var pp=document.getElementById('pp');
pp.selected=1;
返回false;
}
<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>