如何在MVC 5中禁用该页面 [英] How to disable the page in MVC 5

查看:67
本文介绍了如何在MVC 5中禁用该页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



请帮我完成以下任务。



我有一个In我视图中的活动复选框。如果用户单击激活复选框,则应禁用该页面(表示应禁用所有字段)。



如果您一步一步提供,我将不胜感激。 />


非常感谢您提前。

阿里



什么我试过了:



亲爱的朋友们,



请帮我完成以下任务。



我的视图中有一个In active复选框。如果用户单击激活复选框,则应禁用该页面(表示应禁用所有字段)。



如果您一步一步提供,我将不胜感激。 />


非常感谢您提前。

Ali

解决方案

递归禁用和重新启用页面上的所有输入元素可以在我的文章 Modal Popup From Scratch



下载源代码,找到文件ModalPopup.js和函数 disableAll 。此函数的第一个参数是收集所有已禁用元素的列表,稍后,您可以重新启用它们。第二个参数是应该从禁用中跳过的HTML元素,其所有子节点,第三个参数是要禁用的所有控件的父元素。



-SA

Dear Friends,

Please help me to complete below task.

I have a In active checkbox in my view. If user clicking on In active check box that page should be disabled(means all fields should be disabled).

I would appreciate if you provide step by step.

Thank you very much in advance.
Ali

What I have tried:

Dear Friends,

Please help me to complete below task.

I have a In active checkbox in my view. If user clicking on In active check box that page should be disabled(means all fields should be disabled).

I would appreciate if you provide step by step.

Thank you very much in advance.
Ali

解决方案

The method for recursive disabling and re-enabling of all the input elements on the page can be found in my article Modal Popup From Scratch.

Download the source code, locate the file "ModalPopup.js" and the function disableAll. First argument of this function is the list where all the disabled elements are gathered, later on, you can re-enable them. Second argument is the HTML element which should be skipped from disabling, with all its children, third argument is the parent element of all the controls to be disabled.

—SA


这篇关于如何在MVC 5中禁用该页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆