JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Servlet/JSP 討論區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 jsp 顯示於 firefox , ie
top03

free in sky ~~



發文: 25
積分: 0
於 2005-05-20 13:56 user profilesend a private message to usersend email to top03reply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請教各位前輩..
ap:jboss3.2.7
不知道為啥~~
我的jsp檔在ie會變成--下載檔案..
在firefox是正常的..只是javascript的window.close無法使用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<%@
page contentType="text/html ; charset=Big5" 
import="java.sql.*"
import="java.sql.Statement" 
import="java.sql.Connection"
%>
 
<html>
 
<script>
<!--
      function CloseBut(){
        windows.close();
      }
-->
</script>
 
<head>
 
<title>MdfEmpolyee.jsp</title>
 
</head>
 
<body>
 
<%
  //取得欲執行之命令
String btAdd = request.getParameter("btAdd");
String btMdf = request.getParameter("btMdf");
String btDel = request.getParameter("btDel");
String btClr = request.getParameter("btClr");
String btEnd = request.getParameter("btEnd");
 
%>
 
<form action="test.jsp" method="post">
 
<p>員工代號:<input type="text" name="empNo"></p>
<p>員工姓名:<input type="text" name="empNm"></p>
<p>身份證 :<input type="text" name="empID"></p>
<p>員工地址:<input type="text" name="empAdd"></p>
<p>員工電話:<input type="text" name="empTel"></p>
 
<input name="btAdd" type="submit" value="新增"> 
<input name="btMdf" type="submit" value="修改"> 
<input name="btDel" type="submit" value="刪除">
<input name="btClr" type="reset" value="清除"> 
<input name="btEnd" type="button" onclick="CloseBut()" value="結束">
 
</form>
 
<%
Connection conn = null;
Statement stmt = null;
 
  if (btEnd == null) {
 
    // 與資料庫連結 
    try {
      Class.forName("net.sourceforge.jtds.jdbc.Driver");
      conn = DriverManager.getConnection(
          "jdbc:jtds:sqlserver://192.168.2.166:1433/test",
          "sql2k", "sql2k");
 
    } catch (SQLException e) {
      e.printStackTrace();
 
    }
 
    stmt = conn.createStatement();
 
    //取得各欄位值
    String empNo = request.getParameter("empNo");
    String empNm = request.getParameter("empNm");
    String empID = request.getParameter("empID");
    String empAdd = request.getParameter("empAdd");
    String empTel = request.getParameter("empTel");
 
    //sql.command  
    String strSQL;
 
    if (btAdd != null) {//新增
 
    }
    if (btMdf != null) {//修改
 
    }
    if (btDel != null) {//刪除            
 
    }
  } else {
    if (stmt != null)
      stmt.close();
    if (conn != null)
      conn.close();
  }
%>
 
</body>
 
</html>


top03 edited on 2005-05-20 14:45
reply to postreply to post
話題樹型展開
人氣 標題 作者 字數 發文時間
2388 jsp 顯示於 firefox , ie top03 2224 2005-05-20 13:56
1878 Re:jsp 顯示於 firefox , ie koji 88 2005-05-20 16:24
2008 Re:jsp 顯示於 firefox , ie top03 163 2005-05-20 16:54
1943 Re:jsp 顯示於 firefox , ie top03 435 2005-05-20 17:57
1896 Re:jsp 顯示於 firefox , ie Jill_Yeh 220 2005-05-20 18:05
1814 Re:jsp 顯示於 firefox , ie top03 325 2005-05-23 10:18
1923 Re:jsp 顯示於 firefox , ie duwei 139 2005-05-20 20:51
1799 Re:jsp 顯示於 firefox , ie koji 86 2005-05-20 22:46
2012 Re:jsp 顯示於 firefox , ie joy6811 45 2005-05-27 11:19
1806 Re:jsp 顯示於 firefox , ie Nik 15 2005-05-28 01:48
1718 Re:jsp 顯示於 firefox , ie top03 68 2005-05-30 09:18
1681 Re:jsp 顯示於 firefox , ie Nik 332 2005-06-08 03:55
1757 Re:jsp 顯示於 firefox , ie top03 562 2005-06-08 11:28
1668 Re:jsp 顯示於 firefox , ie metavige 374 2005-06-08 18:43
1703 Re:jsp 顯示於 firefox , ie top03 175 2005-06-09 13:07
» JWorld@TW »  Servlet/JSP 討論區

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8