📄 jsp页面内实现动态下拉框!!.htm
字号:
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=46833"
target=_blank>full</A> 回复于:2003-07-03 21:33:51</SMALL></TD></TR>
<TR>
<TD>还是不行啊!不知道是不是我理解错误,代码如下:
<BR><BR>String[] runcardResult = new String [xr.getRuncard().length];
<BR>String[] runcard2ISO = new String [runcardResult.length]; //转为ISO8859_1字符集的流程名
<BR>runcardResult = xr.getRuncard();
<BR>String runcard = new String (request.getParameter("runcard"));//用于显示
<BR>if(runcard ==null){
<BR> runcard=runcardResult[0];
<BR> }
<BR><BR>String runcardToQuery = new String (runcard.getBytes("8859_1"));//用于查询
<BR><BR>String[] stepnameResult = new String [xr.getStepname(runcardToQuery).length]; //流程名
<BR>String[] stepname2ISO = new String [stepnameResult.length]; //转为ISO8859_1字符集的流程名
<BR>stepnameResult = xr.getStepname(runcardToQuery);
<BR>String stepname = new String(request.getParameter("stepname"));//用于显示
<BR>if(stepname ==null){
<BR>stepname=stepnameResult[0];
<BR> }
<BR><BR><BR><BR>还是[color=red:4bcd9f061c]NullPointer[/color:4bcd9f061c]例外!<BR><BR></TD></TR>
<TR>
<TD>
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=46833"
target=_blank>full</A> 回复于:2003-07-03 21:34:28</SMALL></TD></TR>
<TR>
<TD>还是不行啊!不知道是不是我理解错误,代码如下:
<BR><BR>String[] runcardResult = new String [xr.getRuncard().length];
<BR>String[] runcard2ISO = new String [runcardResult.length]; //转为ISO8859_1字符集的流程名
<BR>runcardResult = xr.getRuncard();
<BR>String runcard = new String (request.getParameter("runcard"));//用于显示
<BR>if(runcard ==null){
<BR> runcard=runcardResult[0];
<BR> }
<BR><BR>String runcardToQuery = new String (runcard.getBytes("8859_1"));//用于查询
<BR><BR>String[] stepnameResult = new String [xr.getStepname(runcardToQuery).length]; //流程名
<BR>String[] stepname2ISO = new String [stepnameResult.length]; //转为ISO8859_1字符集的流程名
<BR>stepnameResult = xr.getStepname(runcardToQuery);
<BR>String stepname = new String(request.getParameter("stepname"));//用于显示
<BR>if(stepname ==null){
<BR>stepname=stepnameResult[0];
<BR> }
<BR><BR><BR><BR>还是[color=red:1a0b5e9e00]NullPointer[/color:1a0b5e9e00]例外!<BR><BR></TD></TR>
<TR>
<TD>
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=31634"
target=_blank>rollingpig</A> 回复于:2003-07-04 09:40:26</SMALL></TD></TR>
<TR>
<TD>String stepname = new String(request.getParameter("stepname"));//
<BR><BR>--->
<BR><BR>String stepname = request.getParameter("stepname"));//
<BR><BR>new String(null)是会有Exception的<BR><BR></TD></TR>
<TR>
<TD>
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=46833"
target=_blank>full</A> 回复于:2003-07-04 18:53:28</SMALL></TD></TR>
<TR>
<TD>搞定了!!好高兴,多谢两位版主啦!!<BR><BR></TD></TR>
<TR>
<TD>
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=31634"
target=_blank>rollingpig</A> 回复于:2003-07-07 10:32:56</SMALL></TD></TR>
<TR>
<TD>不用谢,有空多来走走!!<BR><BR></TD></TR>
<TR>
<TD>
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=44763"
target=_blank>test_tmp</A> 回复于:2003-07-30 12:31:10</SMALL></TD></TR>
<TR>
<TD>可不可以请“rollingpig”谈一下: <BR>3。比较特殊的方法
<BR>在A选中之后,到服务器去下载一段动态script,在script里改动B的值 <BR>具体要怎么实现!
<BR>谢谢!<BR><BR></TD></TR>
<TR>
<TD>
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=70569"
target=_blank>pipen</A> 回复于:2003-07-30 15:01:41</SMALL></TD></TR>
<TR>
<TD>恩,也想学习学习,同楼上的问题<BR><BR></TD></TR>
<TR>
<TD>
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=31634"
target=_blank>rollingpig</A> 回复于:2003-07-30 16:43:48</SMALL></TD></TR>
<TR>
<TD>may like this <BR><BR>[code:1:c51ef70a01] <BR>data.jsp
<BR><BR><%@ page contentType="text/html; charset=GB2312" %>
<BR><?xml version="1.0" encoding="GB2312" standalone="yes"?>
<BR><dummy> <BR><%
<BR>String id=request.getParameter("id");
<BR>java.sql.ResultSet rs=null;
<BR>rs=dbConn.exceute("select codes,name from aa where id = " + id);
<BR>while(rs.next()){ <BR>%> <BR><dummy2> <BR><codes>
<BR><%=rs.getString(1)%> <BR></codes> <BR><name>
<BR><%=rs.getString(2)%> <BR></name> <BR></dummy2>
<BR><%}%> <BR></dummy> <BR><BR>[/code:1:c51ef70a01]
<BR><BR>[code:1:c51ef70a01] <BR>test.jsp
<BR><BR><form name=test>
<BR><select name=a onchange="change()">
<BR><option value=1>ONE</option>
<BR><option value=2>TWO</option>
<BR><option value=3>THREE</option>
<BR><select> <BR><select name=b></select>
<BR></form> <BR><XML id=xmldso></XML>
<BR><script> <BR>function change(){
<BR>xmldso.async = false;
<BR>xmldso.load("data.jsp?id="+document.test.a.value);
<BR>with(document.test.b){ <BR>xmldso.recordset.MoveFirst();
<BR>for (var i=0;!xmldso.recordset.eof;i++){
<BR>length=i+1;
<BR>options[i].value=xmldso.recordset.fields(0).value;
<BR>options[i].text=xmldso.recordset.fields(1).value;
<BR>xmldso.recordset.MoveNext(); <BR>} <BR>} <BR>} <BR>change();
<BR></script> <BR><BR>[/code:1:c51ef70a01]<BR><BR></TD></TR>
<TR>
<TD>
<HR>
<SMALL> <A
href="http://www.chinaunix.net/forum/profile.php?mode=viewprofile&u=44763"
target=_blank>test_tmp</A> 回复于:2003-08-01 21:06:14</SMALL></TD></TR>
<TR>
<TD>谢了rollingpig,正在看!<BR><BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="75%" border=0>
<TBODY>
<TR>
<TD width="100%" bgColor=#49ade9 colSpan=5 height=2><IMG height=1
src="jsp页面内实现动态下拉框!!.files/bline.gif"
width=1></TD></TR></TBODY></TABLE><BR><SMALL>Copyright © ChinaUnix.net
<BR> * 请尊重我们的劳动,转载请注明出自<A
href="http://www.chinaunix.net/">ChinaUnix.net</A>及作者名 *
</SMALL></CENTER></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -