标签: javascript html button anchor
阅读documentation时,我们无法在Button元素中添加Anchor元素。
所以我不明白我是否可以认为这段代码有效,似乎可行:
<a href="https://www.amazon.com" id="anchor" target="_blank"> <span>Click me to go to the website</span> <button id="button"> Click me to change color! </button> </a>
https://codepen.io/ale-grosselle/pen/XWKJmJW