Set the contents of the entire page to read-only, not editor

Source: Internet
Author: User
Make the contents of the entire page read-only, not editable
PHP page, there is a body,
There are many kinds of text boxes in the body
Now how to make all the contents of the body read only,
Thanks


------Solution--------------------
All input plus disabled.

------Solution--------------------
You can iterate through the elements of the form without having to write every single one.
------Solution--------------------
1, the method is not wrong
------Solution--------------------
Add a read-only property to a text box readonly
------Solution--------------------
A simpler approach is to add a transparent layer to the form
------Solution--------------------
Disabled. As in a form, data cannot be passed

If not to pass, still can't modify, with ReadOnly
------Solution--------------------
Let me summarize.
The more advanced method is to add a div inside the body, set its style of the index value of the largest, such as 9999, combined with CSS and DIV technology can achieve a transparent layer of the current page, so that users can not operate.

The more thorough approach is to traverse all the form elements to disabled it, which is done in a jquery way. As for the upstairs brothers, the ReadOnly attribute is valid only for text boxes, text areas, and for form elements such as drop-down boxes.
------Solution--------------------
Transparent layer implementation of DIV


Powered by Xty_zyn













  • You can also insert a picture here
    Do you want to register a map business card?

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.