HTML Form Button value is not posted in Safari and Chrome

后端 未结 10 1916
旧巷少年郎
旧巷少年郎 2021-01-08 00:15

I am using jQuery to submit a form when a button is clicked. I would then like to test the value of the button, however, this doesn\'t get submitted in Safari and Chrome. Wh

10条回答
  •  不思量自难忘°
    2021-01-08 01:02

    As Robert says above when using the

    VS

    
    

    In this example your POST data would have the Key Value pair of:

    Search Simple

    or

    Search Advanced

    And then based on that POST value you can write your code to take the appropriate action. :)

    i.e. you don't need to use input, just use button with name/value and you'll be fine.

提交回复
热议问题