jquery设置页面元素为只读

来源:互联网 发布:java web helloworld 编辑:程序博客网 时间:2024/05/18 22:46
/** * 设置页面为只读 */Utils.setPageUnEdit=function(fromId){    $(":text,:password,:submit,:image,:reset,:button,:file",'#'+fromId).each(function(i){        $(this).attr("readonly",true);    });    $("textarea",'#'+fromId).each(function(i){        $(this).attr("readonly",true);    });    $("select",'#'+fromId).each(function(i){        $(this).attr("readonly",true);    });    // 超链接    $("form a",'#'+fromId).each(function(){        $(this).hide();    });}
0 0
原创粉丝点击