jsp下拉框
我想给jsp中的下拉框做个控制。
Java code:
<html:select property="TSubcontractSubfinishproductionDto.mm" style="width:60px" onchange="changetime();">
<html:options collection ="monthlist" property ="value" labelProperty ="label" />
</html:select>
.....
<table>..table1..</table>
.....
<table>..table2..</table>
上面的代码只要要表达我的意思。
上面的下拉框是月份的下拉框,我想要的是,比如下拉框选择1到6月份的时候,页面显示的是table1;如果选择7到12月份的时候,页面显示的是table2.
这个怎么弄的?
table 用div包起来。
下拉框onchange 调用改变div display的函数
不好意思,这样看,有点空,能大概写下具体实现吗?谢谢
<script type="text/javascript">
function fun(){
id = document.getElementById("select1").value;
if(id <=6){
document.getElementById("div1").style.display="";
document.getElementById("div2").style.display="none"
}else{
document.getElementById("div1").style.display="none";
document.getE
相关问答:
我的开发的平台是Myeclipes6.0 + tomcat5.x + mysql
我所有的编码方式都是用的UTF-8
我只用了Strtus框架
在一个form中如下用的是post的提交方式:
<form class="form" action=&quo ......
我是用STRUTS ,做了一个JSP页面,提交后没有存入数据库。
JSP代码如下:
aa.jsp代码
<%@ page contentType="text/html;charset=gb2312" language="java"%>
<%@ taglib uri=" ......
//用客户的session的id建立一个临时文件:
//String tempFileName=(String)session.getId();
String tempFileName = (String)session.getId();
//out.println(& ......
问题是这样的:
我有一个文件nagiv.jsp 另一个文件failure.jsp包含他,同时nagiv文件中有一个可以跳转到yy.jsp的commandButton,但是我将failure中点击nagiv中的哪个commandButton,也面不会跳转 ......
我JSP的页面是:
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......