如何禁用包含2个链接按钮的javascript面板 [英] How to disable panel in javascript that contain 2 link button
问题描述
如何在javascript中禁用包含2个链接按钮(全部和无)的面板。如何做到这一点我尝试过这样但是没有用。有没有人对此有任何想法? document.getElementById(<%= mypanel.ClientID%>)。disabled = true;所有都是asp.net服务器控制器而不是html。
我尝试过:
document.getElementById(<%= mypanel.ClientID%>>)。disabled = true;
这将有助于 asp.net - 启用/禁用面板和所有它使用Javascript进行控制 [ ^ ]
你真正想做什么;
使面板无响应,使用户可以看到但用户无法看到点击任何按钮。通常情况下,这可以通过启用/禁用来实现。
如果您希望它们不可供用户使用,那么简单使其不可见。
将此面板添加到html中的div中。然后简单地说,使这个div可见/不可见或启用/禁用。
如果你想直接禁用面板,那就去吧;
要禁用;
var panel = document.getElementById('<%= PanelID.ClientID%>');
panel.enable = false
或
隐形
var panel = document.getElementById('& lt;%= PanelID.ClientID%& gt;');
panel.visible = false
对于这两种情况,都需要添加
ClientIDMode =静态
html侧面板标签的属性。
How to disable panel in javascript that contain 2 link button(All and None).How to do that I tried like this but does not worked.Does anybody have any idea about this? document.getElementById("<%=mypanel.ClientID%>").disabled=true;All are asp.net server contol not html .
What I have tried:
document.getElementById("<%=mypanel.ClientID%>>").disabled=true;
this will help asp.net - Enable/Disable Panel and all its control using Javascript [^]
What you exactly want to do;
To make panel non-responsive, such that it is visible to user but user can't able to click on any buttons. Normally, this is possible by enable/disable.
And if you want them to be make non available for users, then simple make it invisible.
Add this panel to separate div in html. And then simply, make this div "visible/invisible" or "enable/disable".
And if you want to disable panel directly, then go for;
To make disable;
var panel = document.getElementById('<%=PanelID.ClientID%>'); panel.enable=false
or
To make invisible
var panel = document.getElementById('<%=PanelID.ClientID%>'); panel.visible=false
For both cases, it is necessary to add
ClientIDMode="Static"
property to panel tag at html side.
这篇关于如何禁用包含2个链接按钮的javascript面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!