根据某些事件使表可见/不可见 [英] Making a table visible/invisible depending on some event

查看:95
本文介绍了根据某些事件使表可见/不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在使用JSP和Javascript开发一个Web应用程序。

我附上了我的表单快照,


我这里有两个不同的Jsps,即Jsp1和Jsp2。

点击Jsp1上的''Show''按钮我弹出另一个Jsp(Jsp2)作为包含表T1的子窗口。


但是很多用户都打开了弹出窗口阻止程序,在这种情况下Jsp2甚至没有出现,所以有没有其他选择,我可以显示表T1作为Jsp1本身的一部分。该表应该出现在表单的顶部(Jsp1)而不是在不同的窗口中,即它应该首先不可见,并且只有当用户点击Jsp1 T1上的Show时才能看到。


这可以通过使用< div>来实现。 ?

我对DOM和Javascript不是很熟悉所以对此有任何建议会非常有帮助。



Hi all,

I am working on a web application using JSP and Javascript.
I have attached a snapshot of my form here,

I have 2 different Jsps here, viz Jsp1 and Jsp2.
On hitting the ''Show'' button on Jsp1 I make another Jsp(Jsp2) pop up as a subwindow containing a Table T1.

But many users have popup blockers turned on and in that case Jsp2 doesnot even show up,so is there any alternative such that I can show Table T1 as a part of Jsp1 itself.The table should appear on top of the form(Jsp1) and not in a different window,i.e it should be invisible at first and only when user hits ''Show'' on Jsp1 T1 should be seen.

Can this perhaps be achieved by using <div> ?
I am not much familiar with DOM and Javascript so any suggestions regarding this would be very helpful.

附加图片
snapshot1.jpg (6.8 KB,1396 views)
Attached Images
snapshot1.jpg (6.8 KB, 1396 views)

推荐答案


大家好,


我正在使用JSP和Javascript处理Web应用程序。

我在这里附上了我的表格的快照,


我这里有两个不同的Jsps,即Jsp1和Jsp2。

点击''显示'' Jsp1上的按钮我将另一个Jsp(Jsp2)弹出作为包含表T1的子窗口。


但是很多用户都有popup blo ckers打开了,在那种情况下Jsp2甚至都没有出现,所以有任何替代方案,我可以将表T1显示为Jsp1本身的一部分。表应该出现在表单的顶部(Jsp1)而不是在不同的窗口中,即它应该首先是不可见的,并且只有当用户点击Jsp1 T1上的''Show'时才能看到它。


这可以通过使用< div>来实现。 ?

我对DOM和Javascript不是很熟悉所以对此有任何建议会非常有帮助。
Hi all,

I am working on a web application using JSP and Javascript.
I have attached a snapshot of my form here,

I have 2 different Jsps here, viz Jsp1 and Jsp2.
On hitting the ''Show'' button on Jsp1 I make another Jsp(Jsp2) pop up as a subwindow containing a Table T1.

But many users have popup blockers turned on and in that case Jsp2 doesnot even show up,so is there any alternative such that I can show Table T1 as a part of Jsp1 itself.The table should appear on top of the form(Jsp1) and not in a different window,i.e it should be invisible at first and only when user hits ''Show'' on Jsp1 T1 should be seen.

Can this perhaps be achieved by using <div> ?
I am not much familiar with DOM and Javascript so any suggestions regarding this would be very helpful.



你可以给一个表体标签一个id(我不确定给一个表一个id)然后使用document.getElementById(''id' ')。style =" display:none" ;;

You can give a table body tag an id (I''m not sure about giving a table an id) and then use document.getElementById(''id'').style = "display:none";


是的,你可以给表本身一个id并做同样的事。
yes you can give the table itself an id and do the same.



是的,你可以给表本身一个id并做同样的事情。
yes you can give the table itself an id and do the same.



谢谢Clint。那段时间会很方便

Thanks Clint. That will come handy some time


这篇关于根据某些事件使表可见/不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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