<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Kimi's NutShell

    我荒廢的今日,正是昨日殞身之人祈求的明日

    BlogJava 新隨筆 管理
      141 Posts :: 0 Stories :: 75 Comments :: 0 Trackbacks

    1.Struts下面Vector居然不在bean 的屬性認識范疇,而String[]可行!
    2.頁面刷新的時候,可以在<HEAD>處設置no-cache,完成了頁面的刷新任務,但是耗費資源了。

    <%@ page contentType="text/html; charset=gb2312" language="java"
    ?import="java.sql.*" errorPage=""%>
    <%@ page import="com.telecom.common.form.DepForm"%>
    <%@ page import="java.sql.Connection"%>
    <%@ page import="java.sql.ResultSet"%>
    <%@ page import="java.sql.Statement"%>
    <%@ page import="java.util.Vector"%>
    <%@ page import="com.telecom.dao.DBLinker"%>
    <%@ page import="com.telecom.common.form.EnterpriseNumForm"%>


    <%
    ?EnterpriseNumForm enf = new EnterpriseNumForm();
    ?Connection conn = null;
    ?ResultSet rs = null;
    ?ResultSet rs2 = null;
    ?Statement sta = null;
    ?Statement sta2 = null;
    ?try {
    ??conn = (Connection) DBLinker.linkDB();
    ??String sql1 = "select distinct(strEnID) eid from tbEnterpriseNum";
    ??rs = null;
    ??sta = conn.createStatement();
    ??rs = sta.executeQuery(sql1);
    ??if (rs.next()) {
    ???enf.setEnID(rs.getString("eid"));
    ??}else{
    ??enf.setEnID("0000");
    ??}

    ??String sql2 = "select distinct(strPresentNum) pn from tbEnterpriseNum ";
    ??rs2 = null;
    ??sta2 = conn.createStatement();
    ??rs2 = sta2.executeQuery(sql2);
    ??Vector v = new Vector();
    ??
    ??while (rs2.next()) {
    ???v.add(rs2.getString("PN"));
    ??}
    ??String[] s=new String[v.size()];
    ??for(int i=0;i<v.size();i++){
    ??s[i]=v.elementAt(i).toString();
    ??}
    ??enf.setNums(s);
    ??System.out.println(v.size());
    ??//session.setAttribute("enf",enf);
    ?} catch (Exception e) {
    ?} finally {
    ??rs2.close();
    ??rs.close();
    ??sta.close();
    ??sta2.close();
    ??conn.close();
    ?}
    %>


    <html>
    ?<head>
    ??<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    ??<link rel="stylesheet" type="text/css" href="../include/style.css">
    ??<title>詳細信息</title>
    ??<script language="javascript">

    function checkNum(){
    ????selectAllMember(form1.nums);
    ????form1.submit();
    ???
    ??}
    function selectAllMember(selection)
    ??{
    ???var ops=selection.options;
    ???for(var i=0;i<ops.length;i++)
    ???{
    ????ops[i].selected=true;
    ???}
    ??}
    function deleteSelectedMember(selection)
    ??{
    ???var ops=selection.options;
    ???for(var i=0;i<ops.length;i++)
    ???{
    ????if(ops[i].selected==true)
    ????{
    ?????selection.remove(i);
    ?????i--;
    ????}
    ???}
    ??}
    function other_add(){
    ??????? if(form1.otherNum.value==""){
    ??alert("不能為空");
    ??}else{
    ??additemNoRepeat(form1.otherNum.value,form1.otherNum.value,form1.nums);
    ??}
    ?
    }

    function additemNoRepeat(Otext,Ovalue,selectElement){//不重復的添加
    ?for(j=0;j<selectElement.options.length;j++){
    ??if(selectElement.options[j].value==Ovalue){
    ???var flag=1;
    ???alert(Otext+"已添加");
    ???break;
    ??}
    ?}
    ?if(flag!=1){
    ??selectElement.options[selectElement.options.length]=new Option(Otext,Ovalue);
    ?}
    }
    ??
    ?

    </script>
    ??<style type="text/css">
    <!--
    .style3 {FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #246bad; LINE-HEIGHT: 2 }
    body {
    ?background-color: #E7F0FA;
    }
    -->
    </style>
    <meta http-equiv="pragma" content="no-cache">

    <%response.setHeader("Pragma","No-cache");?
    ??????? response.setHeader("Cache-Control","no-cache");?
    ??????? response.addHeader("Expires","Thu, 01 Jan 1970 00:00:01 GMT");?
    ??????? response.flushBuffer();%>

    ?</head>

    ?<body opener.location.reload()">

    ??<table width="100%">
    ???<tr>
    ????<td bgcolor="#ffffff">
    ?????<table width="530" border="0" cellpadding="0" cellspacing="0"
    ??????style="word-break:break-all; ">
    ??????<tr>
    ???????<td width="60" background="../linkman/images/s22.jpg">
    ????????&nbsp;
    ???????</td>
    ???????<td width="447" background="../linkman/images/s23.jpg">
    ????????&nbsp;
    ????????<span class="style3">修改企業號碼和主叫綁定號碼</span>
    ???????</td>
    ???????<td width="6">
    ????????<img src="../linkman/images/s24.jpg" width="6" height="58">
    ???????</td>
    ???????<td width="17"></td>
    ??????</tr>

    ??????<tr>
    ???????<td colspan="4">
    ????????<table width="100%" border="0" cellpadding="0" cellspacing="0">
    ?????????<tr>
    ??????????<td width="17">
    ???????????&nbsp;
    ??????????</td>
    ??????????<td bgcolor="#e7f0fa">
    ???????????<table width="94%" border="0" align="center" cellpadding="0"
    ????????????cellspacing="0">
    ????????????<form name="form1" method="post"
    ?????????????action="../companyadmin/EditENF.do?method=SaveENF" >
    ????????????<tr>
    ?????????????<td width="17%" height="25">
    ??????????????企業號碼:
    ?????????????</td>
    ?????????????<td width="100%" height="25">
    ?????????????
    ??????????????<input name="enID" type="text" id="enID"
    ???????????????value="<%=enf.getEnID()%>">
    ?????????????</td>
    ????????????</tr>
    ????????????<tr>
    ?????????????<td width="17%" height="25">
    ??????????????主叫綁定號碼:
    ?????????????</td>
    ?????????????<td>
    ??????????????<select name="nums" size="20" multiple id="nums"
    ???????????????style="width:64%">
    ???????????????<%
    ????????????????String[] v = enf.getNums();
    ????????????????System.out.println(v.length);
    ????????????????if (v.length != 0) {

    ?????????????????for (int k = 0; k < v.length; k++) {
    ??????????????????String oldpn = new String();
    ??????????????????oldpn = v[k];
    ??????????????????System.out.println(oldpn);
    ???????????????%>
    ???????????????<option value="<%=oldpn%>">
    ????????????????<%=oldpn%>
    ???????????????</option>
    ???????????????<%
    ????????????????}
    ????????????????}
    ???????????????%>
    ??????????????</select>

    ???????????? ??<input type="button" name="Submit" value="刪除號碼"
    ???????????????onClick="deleteSelectedMember(document.all.nums)">

    ?????????????</td>
    ????????????</tr>
    ????????????<tr>
    ?????????????<td height="30" scope="col">
    ??????????????請輸入號碼:
    ?????????????</td>
    ?????????????<td>
    ??????????????<input? type="text" id="otherNum">
    ??????????????&nbsp;
    ??????????????<input type="button" name="Submit" value="添加"
    ???????????????onClick="other_add()">

    ?????????????</td>
    ????????????</tr>

    ????????????</form>
    ???????????</table>
    ??????????</td>
    ??????????<td width="17">
    ???????????&nbsp;
    ??????????</td>
    ?????????</tr>
    ????????</table>
    ???????</td>
    ??????</tr>

    ?

    ??????<tr>
    ???????<td height="30" colspan="4">
    ????????<div align="center">
    ?????????<a href="javascript:checkNum();">保存設置</a>

    ????????</div>
    ???????</td>
    ??????</tr>
    ?????</table>
    ????</td>
    ???</tr>
    ??</table>

    ?</body>
    </html>

    ?

    ?

    posted on 2007-04-24 15:42 Kimi 閱讀(273) 評論(0)  編輯  收藏 所屬分類: Java
    主站蜘蛛池模板: 全免费a级毛片免费看不卡| 国产大片51精品免费观看| 亚洲国产成人久久一区久久 | 国产精品怡红院永久免费| 亚洲国产精品特色大片观看完整版| 亚洲综合精品香蕉久久网| a级毛片免费观看网站| 亚洲三区在线观看无套内射| 久久最新免费视频| 亚洲韩国精品无码一区二区三区| 亚洲午夜精品一区二区公牛电影院| 91久久青青草原线免费| 91亚洲精品视频| 国产国产人免费视频成69堂| 亚洲免费福利在线视频| 热99re久久免费视精品频软件| 精品久久久久亚洲| 亚洲精品一级无码中文字幕| 两性色午夜视频免费网| 色播在线永久免费视频| 西西人体大胆免费视频| 1000部免费啪啪十八未年禁止观看| 久久久无码精品亚洲日韩蜜臀浪潮| 100部毛片免费全部播放完整| 亚洲国产片在线观看| 日韩激情无码免费毛片| 一级毛片免费视频网站| 欧洲美熟女乱又伦免费视频| 色妞www精品视频免费看| 久久久久亚洲AV成人网| 亚洲a一级免费视频| 亚洲码欧美码一区二区三区| 国产公开免费人成视频 | 两个人日本免费完整版在线观看1| 亚洲熟妇中文字幕五十中出| 182tv免费视视频线路一二三| 亚洲色大成网站www永久男同| 亚洲欧洲日产国码高潮αv| 精品熟女少妇av免费久久| 亚洲人片在线观看天堂无码| 国产成人综合亚洲AV第一页|