问题描述
大家好,
我正在使用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.
推荐答案
你可以给一个表体标签一个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";
谢谢Clint。那段时间会很方便
Thanks Clint. That will come handy some time
这篇关于根据某些事件使表可见/不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!