easyui read only

function disableForm(jqForm) {
    function jeTypeMatch(jeTypec) {
        var jet=jeTypec.match(/easyui-(combobox)/)||jeTypec.match(/[a-z-]+\s(textbox)/)||jeTypec.match(/easyui-(datebox)/);
        return jet&&jet[1];
    }
    $('input[class^=easyui]',$(jqForm)).each(function () {
        var jetype = jeTypeMatch($(this).attr("class"));
        $(this)[jetype]({"disabled" : true});
    })
    $('textarea', $(jqForm)).attr("disabled", "disabled").css("background", "rgb(235, 235, 228)");
}
disableForm("#pf")

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327105701&siteId=291194637