0
Hello, I’m a beginner and I would like to know how to redirect this button(Sign) to enable terms of use for some link.
<div class="modal-body">
     <!--botão termos de uso-->
     <script>   
         function HabiDsabi(){  
             if(document.getElementById('habi').checked == true){ 
                 document.getElementById('envia').disabled = ""  
             }  
             if(document.getElementById('habi').checked == false){ 
                 document.getElementById('envia').disabled = "disabled"  
            }
         }
     </script>
     <form name="form1">
         <p>
             <input type="checkbox" name="habi" id="habi" onClick="HabiDsabi()"> 
             Eu li e aceito os termos de uso 
             <a target="_blank" href="tos.html">termos de uso<a>.
         </p>
         <input type="button" class="btn btn-terciary"  name="envia" id="envia" value="Assinar" disabled>
     </form>
     <!-- fim do botão -->
</div>
If it is to redirect to another page, use the
<a>with the attributehref.– Woss
From what I understand, you want to redirect the user to a link when they click the button and have checbox marked, correct? If so, within its Enable(){}function, when redirecting just use this function ( window.open( URL, name, Specs ) ) If so, for more information see: https://www.geeksforgeeks.org/open-a-link-without-clicking-on-itusing-javascript/
– Sóstenes G. de Souza