PHP - Select yes or no, yes causes a new input to appear

前端 未结 1 830
走了就别回头了
走了就别回头了 2021-01-28 18:31

I\'m not sure if this is possible or where to start to tackle it with, but I\'m wanting to create a select with a yes or no option, which if yes is selected (form is yet to be s

1条回答
  •  臣服心动
    2021-01-28 18:59

    I like JavaScript for that kind of stuff, personally.

    
    
    

    And the JavaScript:

    function myFunction(){
      var x=document.getElementById('retrieveMarriage').value;
      if(x == 'yes'){
         document.getElementById('newDate').innerHTML='';
         Whatever else you want to do...
      }
    }
    

    0 讨论(0)
提交回复
热议问题