How can I make an entire HTML form “readonly”?

前端 未结 12 1450
无人及你
无人及你 2020-12-02 07:56

I have two pages with HTML forms. The first page has a submission form, and the second page has an acknowledgement form. The first form offers a choice of many controls, whi

12条回答
  •  半阙折子戏
    2020-12-02 08:14

    I'd rather use jQuery:

    $('#'+formID).find(':input').attr('disabled', 'disabled');
    

    find() would go much deeper till nth nested child than children(), which looks for immediate children only.

提交回复
热议问题