Form submit should stay on the same tab

后端 未结 2 1504

On submitting the form by clicking a button, upon page reload same tab should be opened, but it is going to default tab. I have tried local storage but it doesn

2条回答
  •  -上瘾入骨i
    2021-01-28 18:35

    Couple things to fix. .tab('show') should be .show('tab')

    I changed the show.bs.tab to click.

    I made both divs display:none to start.

    And finally, I put an onload function to show the div that should be shown.

    
      
    
    
    
      
      
    
    Somewhere Else
    

提交回复
热议问题