'; $(this).wrap(''); $(this).parent().append(divHtml); $(this).data("mask","true"); } //取消屏蔽 $.fn.unmask = function () { $(this).parent().find(".divMask").remove(); $(this).unwrap(); $(this).data("mask", "false"); } })(jQuery); //-------------- 插件 end ------------------ //并没有做disabled处理, 只是上面加多了个屏蔽层, 使之无法点到而已。 //这样其它地方无须再处理,更方便。 function changeA2(obj) { var t = { 'key': 'b', 'value': '2' };//映射对应关系 if (obj.value == t.key) { $("#A2").val(t.value); $("#A2").mask(); } else { $("#A2").val(""); $("#A2").unmask(); } }
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn