?? 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 + -