在回发中显示元素 [英] Show element on Postback

查看:57
本文介绍了在回发中显示元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确定我有一个非常简单的问题,但由于某些原因我找不到答案
我有一个基本的JS函数来显示元素

I''m sure I have pretty simple question but for some reasons I can''t find answer
I have a basic JS function to show an element

function show(obj1) {
var div = document.getElementById(obj1);
div.style.display = ''inline'';
}


.....


.....

<a önclick="show(''Div'')>Show Panel</a><br mode=" hold=" /><div id=" div="  runat=" server=" style=" none="><br mode=" btnsearch=" runat=" search=" OnClick=" btnsearch_click=" /><br mode=" display=", " inline="");<br mode="hold" />//and Div.Style("display") = "inline";<br mode="hold" />//and Div.Visible = true;<br mode="hold" />}</pre><br mode="hold" />no matter what I do, it gets hidden.</xml>"></a>

推荐答案

如何确定要在回发中显示它? div是否设置为您想要的valye,即使未显示也是如此?如果您基于在回发时返回内联且在第一次渲染时不返回内联的属性进行设置,该怎么办?
How do you know for sure you want it shown on postback ? Does the div get set to the valye you want, even if it''s not shown ? What if you set it based on a property that returns inline on postback, and none on first render ?


我只想实现高级搜索面板"
单击< a onclick ="show(``Div'')>显示面板</a>时,将显示一个包含所有高级过滤器的面板,包括搜索"和隐藏"按钮.在搜索"点击上,因此我不想隐藏搜索"点击上的面板.但是它还是隐藏了
I just wanted to implement "Advanced Search panel"
When <a onclick="show(''Div'')>Show Panel</a> clicked, a panel with all advanced filters will be shown, including Search and Hide buttons. It also has a Results dropdown which is populated on Search click, so I don''t want to hide the panel on the Search click. But it hides anyway


这篇关于在回发中显示元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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