Resetting a multi-stage form with jQuery

前端 未结 30 2011
谎友^
谎友^ 2020-11-22 00:58

I have a form with a standard reset button coded thusly:


Trouble i

30条回答
  •  天涯浪人
    2020-11-22 01:30

    I'm just an intermediate in PHP, and a bit lazy to dive into a new language like JQuery, but isn't the following a simple and elegant solution?

    
    
    

    Can't see a reason why not have two submit buttons, just with different purposes. Then simply:

    if ($_POST['submitreset']=="Reset") {
    $_source = "--Choose language from--";
    $_target = "--Choose language to--"; }
    

    You just redefine your values back to whatever the default is supposed to be.

提交回复
热议问题