日期:2014-05-16  浏览次数:20452 次

求解救
如何将后台查出的值放入前台页面
Java后台;


Java code
public static JSONArray getWitdraw(HttpServletRequest request){
        JSONArray jsonArray = null ;
        //String developer_id = OperateSession.getSession(request, "developer_id").toString(); //开发者ID
String  sql = ("select a.account_name, c.dic_name bank_name, a.account, b.CAN_WITHDRAWPRICE from developer_user a, developer_totalsaleslist b,dic c where 1 = 1 and a.developer_id = b.developer_id and c.dic_id = a.bank_name and a.developer_id = 3" );
        List<DynaBean> list= DataBaseOperator.queryList(sql.toString());
        jsonArray = JsonUtil.listDynaBeanToJson(list);
        return jsonArray;

前台页面
<%@page import="net.sf.json.JSONObject"%>
<%@page import="com.developer_finace.FinaceService"%>
<%@page import="net.sf.json.JSONArray"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
  pageEncoding="utf-8"%>
<%
JSONArray jsonArray = FinaceService.getWitdraw(request);
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> </title>
<script type="text/javascript">
var dataArray = <%=jsonArray%>;

</script>
</head>
<body>


  <h3>申请提现</h3> 
   
  1.结账信息填写完整<br />
  2.账户金额必须大于或者等于起寄金额<br /> 
  3.申请日期为每月1-5号<br />
  4.不能重复申请 <br />
  申请提现成功后我们将在2个工作日内按照您的结帐信息及时给您汇款,汇款时产生的寄汇费用将从汇款总额中扣除<br/>
  开户银行:<input type="text" id="bankname" value="<%=这里应该怎么将后台取到的值放在这里呢%>"><br/>  
  银行帐号:<input type="text" id="banknumber" value="<%=%>>"><br/>
  开户人:&nbsp <input type="text" id="holder"> <br/>
  结账方式:<select disabled="disabled">
  <option value ="volvo">网上汇款</option>
  <option value ="saab">Saab</option>
  <option value="opel">Opel</option>(这里如何将查出来的三种方式放到这个下拉款中呢,SQL语句是写在这里吗?该语句是这样 select * from dic t where 1=1 and dic_type_id =9)
  <option value="audi">Audi</option>
  </select><br/>
  提现金额:<input type = "text" id="withdraw"><br/>
   
   
   
   
  <div class="line m20"></div>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tb3">
   
   
  <td><input type="submit" name="button3" id="button3" value="提交" class="btn02" />
  <input type="submit" name="button4" id="button4" value="取消"