Play the Web jquery (ii)---Change the editable state of the form and input (JS in the package)

Source: Internet
Author: User

var formdeal = {/** * function: All input to the form is set to editable * @param the ID of the form to manipulate */formwritable:function (FORMID) {$ ("#" +formid        + "Input,textarea"). Removeattr ("ReadOnly"); $ ("#" +formid+ "Input,textarea"). CSS (' backgroundcolor ', ' #FFF ');},/** * Function: Sets the given input as an editable * @param array of arrays, The ID */inputwriteable:function (array) {for (Var i=0;i<array.length;i++) {$ (' # ' +array[i]) that contains the input to be manipulated. removeattr    ("ReadOnly"); $ (' # ' +array[i]). CSS (' backgroundcolor ', ' #FFF ');}},/** * Function: All input to the form is set to read-only * @param the i */formreadonl to manipulate the form        Y:function (formId) {$ ("#" +formid+ "Input,textarea"). attr ("ReadOnly", true);        $ ("#" +formid+ "Input,textarea"). CSS (' backgroundcolor ', ' #ececec ');        },/** * Function: Sets the given input as read-only * @param array of array, holding the ID of input to be manipulated */inputreadonly:function (array) {        for (Var i=0;i<array.length;i++) {$ (' # ' +array[i]). attr ("ReadOnly", true);        $ (' # ' +array[i]). CSS (' backgroundcolor ', ' #ececec '); }        }};

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.