How to get VALUE from FORM without Submitting it?

后端 未结 5 1157
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 23:06

I would like to get value from Form without submitting it, because the client have to choose the right type of house model to get the right form that fits the selected house

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 23:42

    There is no way of getting data from a form before submitting in in PHP! This is because before submitting the form the PHP script simply is not called.

    If you want to do some validation before sending data you must use javascript which is run on the client browser. Have a look at the jQuery library which makes this very easy: http://docs.jquery.com/Plugins/Validation/validate

    If you want to use PHP only then you will need to separate the form into two pages.

提交回复
热议问题