etiennepinchon/aframe-material

Button link to any webpage

Opened this issue · 1 comments

How to make button to link to any webpages or urls?

try assigning the to normal button as in js then u might want to use document.queryselector() to convert it by letting it be button then use addEventListner() for redirecting to various web pages . It is there in the code yet they replace it with toast.show() . Hope this help :)

<script type="text/javascript"> let button= document.querySelector('a-button'); button.addEventListener('click',()=> { window.location.replace('index.html')}) </script>