Javascript for a form on the server-side?

前端 未结 2 1188
离开以前
离开以前 2021-01-26 10:54

The question emerges from the discussion with Christoph in my last question \'HTML: target=”_blank” for a drop-down list\' and the alternative method by Andrew.

2条回答
  •  借酒劲吻你
    2021-01-26 11:36

    Actually, it depends on the server-side language you're going to use.

    But, it's as simple as reading out the values in the POST and GET Values the Form delivers you.

    i.e. PHP:

    if($_POST["js_enabled"] == 0)  
    {  
       doSomething(); // Redirecting   
    }
    

    But don't forget to validate all values.

    good luck,
    rAyt

    Edit

    There you go (pretty good answer though)

    How are POST and GET variables handled in Python?

提交回复
热议问题