| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 931 人关注过本帖
标题:怎么样获取文本中的动态值......
取消只看楼主 加入收藏
linyan503310
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2010-4-1
收藏
 问题点数:0 回复次数:4 
怎么样获取文本中的动态值......
       <%for(int hh=0;hh<aa;hh++){%>




        <%while(rs1.next()){%>
       <%for(int q=0;q<aa;q++){%>
       <p><%=AllData[hh] %><input type="hidden" name="name_<%=q%>" value="<%=rs1.getString(q+1)%>"/></p>

      

<%}%>

         <%}%>
 <%}%>
在另外一个页面中获取name中的值怎么样获取呀!
搜索更多相关主题的帖子: 获取 文本 动态 
2010-04-01 16:10
linyan503310
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2010-4-1
收藏
得分:0 
<%--
    Document   : index
    Created on : 2010-3-6, 22:25:14
    Author     : linyan
--%>

<%@page contentType="text/html" pageEncoding="gbk"%>
<%@page language="java" import="java.util.*"%>
<%@page import="java.sql.*"%>
<%@page import="myjsp.Select"%>
<jsp:useBean id="xxx" scope="session" class="myjsp.Conn"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.

<html>
  <head>
    <title>bb1.html</title>

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=gbk">

    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

  </head>
<body>

<%
        Select conn1=new Select();

        String id=request.getParameter("id");
     String lie=request.getParameter("lie");
     String tableid=request.getParameter("tableid");

        String strSql1="select * from "+id+" where "+lie+"="+tableid+"";
        ResultSet rs1=conn1.doQuery(strSql1);
        %>
    <%
        Select conn=new Select();
        String strid=request.getParameter("id");
        String strSql="select * from "+strid+"";
        ResultSet rs=conn.doQuery(strSql);
        %>
        <%
        String[] AllData=conn.DB2(rs);
        ResultSetMetaData rsmd = rs.getMetaData();
        int aa=rsmd.getColumnCount();%>
        <%
        
     String request_page_s=request.getParameter("page");

     int request_page;  //当前页
     int pageSize=10;

     try{
      if(request_page_s.length()==0)
       request_page=1;
      else
       request_page=Integer.parseInt(request_page_s);
     }
     catch(Exception e)
     {
      request_page=1;
     }
     Vector vector=xxx.getResult(pageSize,request_page,"select * from "+id+"");

%>

    <center>
        <form id="form1" name="form1" method="post" action="update2.jsp?tableid=<%=tableid%>&lie=<%=lie%>&id=<%=id%>">//传递参数
<tr>

       <%for(int hh=0;hh<aa;hh++){%>




        <%while(rs1.next()){%>
       <%for(int q=0;q<aa;q++){%>
       <p><%=AllData[hh] %><input type="text" name="<%=AllData[hh++] %>" value="<%=rs1.getString(q+1)%>"/></p>


<%}%>

         <%}%>
 <%}%>
            
        </tr>
      
        qq<input type="text" name="tian" value=""/>//测试固定值用
    <input type="submit" name="Submit" value="确定" />

</form>
    </center>

</body>
</html>
这个是我要修改的界面。
2010-04-02 15:35
linyan503310
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2010-4-1
收藏
得分:0 
<%--
    Document   : update2
    Created on : 2010-3-31, 22:29:08
    Author     : linyan
--%>

<%@page contentType="text/html" pageEncoding="gbk"%>
<%@page language="java" import="java.util.*"%>
<%@page import="java.sql.*"%>
<%@page import="myjsp.Select"%>
<%@page import="myjsp.test"%>
<jsp:useBean id="xxx" scope="session" class="myjsp.Conn"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.

<html>
  <head>
    <title>bb1.html</title>

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=gbk">

    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

  </head>
<body>

<%
        

        String id=request.getParameter("id");
     String lie=request.getParameter("lie");
     String tableid=request.getParameter("tableid");
 String  str="";
  str=request.getParameter("strIndex");
  out.print(str);
  %>

  <%
String tt=request.getParameter("tian");


out.print(tt);
%>

<%
Select conn1=new Select();
String strSql1="select * from "+id+" where "+lie+"="+tableid+"";
        ResultSet rs1=conn1.doQuery(strSql1);
        %>


    <%
        Select conn=new Select();
        String strid=request.getParameter("id");
        String strSql="select * from "+strid+"";
        ResultSet rs=conn.doQuery(strSql);
        %>

        <%
        String[] AllData=conn.DB2(rs);
        ResultSetMetaData rsmd = rs.getMetaData();
        int aa=rsmd.getColumnCount();%>

       <%for(int hh=1;hh<aa;hh++){%>
      
       <%=AllData[hh] %>
                <%}%>
</body>
</html>
这个是我要处理修改的页面
2010-04-02 15:37
linyan503310
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2010-4-1
收藏
得分:0 
我是要获取数据库修改后的值,而不是从数据库中的值
2010-04-02 15:47
linyan503310
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2010-4-1
收藏
得分:0 
对不起我只是想去简单的获取已经修改好的动态文本值,其他的没有别的啦!谁能教教我呀!
2010-04-02 21:50
快速回复:怎么样获取文本中的动态值......
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012877 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved