亚洲av无码专区首页,亚洲欧美国产欧美色欲 ,亚洲午夜久久久久久久久电影网 http://www.tkk7.com/sclsch/java備忘zh-cnSat, 10 May 2025 16:55:46 GMTSat, 10 May 2025 16:55:46 GMT60連接數(shù)據(jù)庫javabeanhttp://www.tkk7.com/sclsch/archive/2009/04/03/263692.htmlsclschsclschFri, 03 Apr 2009 02:51:00 GMThttp://www.tkk7.com/sclsch/archive/2009/04/03/263692.htmlhttp://www.tkk7.com/sclsch/comments/263692.htmlhttp://www.tkk7.com/sclsch/archive/2009/04/03/263692.html#Feedback0http://www.tkk7.com/sclsch/comments/commentRss/263692.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/263692.htmlpackage com.secondHand.db;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class DBUtil {
    
private String url = "jdbc:mysql://localhost:3306/db_secondhand?user=root&password=root";

    
private String dbUserName = "root";

    
private String dbUserPassword = "root";

    
private String driver = "com.mysql.jdbc.Driver";

    
private Connection conn = null;

    
private Statement stmt = null;

    
private ResultSet rs = null;

    
public DBUtil() {
        
try {
            Class.forName(driver);
        } 
catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    
private Connection getConnection() {
        
try {
            conn 
= DriverManager.getConnection(url, dbUserName, dbUserPassword);
        } 
catch (SQLException e) {
            e.printStackTrace();
        }
        
return conn;
    }

    
private void close(ResultSet rs, Statement stmt, Connection conn) {
        
if (rs != null) {
            
try {
                rs.close();
            } 
catch (SQLException e) {
                e.printStackTrace();
            }
        }
        
if (stmt != null) {
            
try {
                stmt.close();
            } 
catch (SQLException e) {
                e.printStackTrace();
            }
        }
        
if (conn != null) {
            
try {
                conn.close();
            } 
catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }

    
public List query(String sql) {
        List list 
= new ArrayList();

        conn 
= this.getConnection();
        
try {
            stmt 
= conn.createStatement();
            rs 
= stmt.executeQuery(sql);
            
// 獲取數(shù)據(jù)庫表結(jié)構(gòu)
            ResultSetMetaData rsm = rs.getMetaData();
            
// 取得數(shù)據(jù)庫的列數(shù)
            int col = rsm.getColumnCount();
            
// 生成col長度的Object數(shù)組
            Object[] obj = new Object[col];
            
// 遍歷結(jié)果集,將結(jié)果存入Object數(shù)組
            while (rs.next()) {
                
for (int i = 0; i < col; i++) {
                    obj[i] 
= rs.getObject(i + 1);
                }
                list.add(obj);
            }
        } 
catch (SQLException e) {
            e.printStackTrace();
        } 
finally {
            
this.close(rs, stmt, conn);
        }
        
return list;
    }

    
public void update(String sql) {
        
try {
            conn 
= this.getConnection();
            stmt 
= conn.createStatement();
            stmt.executeUpdate(sql);
        } 
catch (SQLException e) {
            e.printStackTrace();
        }
finally{
            
this.close(rs, stmt, conn);            
        }
    }

    
public static void main(String args[]) {
        DBUtil nj 
= new DBUtil();
        String sql 
= "select * from users";
        List list 
= nj.query(sql);
        
// 返回list的迭代器
        Iterator it = list.iterator();
        
// 遍歷迭代器,取出結(jié)果
        while (it.hasNext()) {
            Object[] o 
= (Object[]) it.next();
            
int id = ((BigDecimal) o[0]).intValue();
            System.out.println(id);
        }

    }
}


sclsch 2009-04-03 10:51 發(fā)表評論
]]>
屏幕截圖工具LittleScreenCapture 更新http://www.tkk7.com/sclsch/archive/2009/01/27/252621.htmlsclschsclschTue, 27 Jan 2009 13:45:00 GMThttp://www.tkk7.com/sclsch/archive/2009/01/27/252621.htmlhttp://www.tkk7.com/sclsch/comments/252621.htmlhttp://www.tkk7.com/sclsch/archive/2009/01/27/252621.html#Feedback2http://www.tkk7.com/sclsch/comments/commentRss/252621.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/252621.html閱讀全文

sclsch 2009-01-27 21:45 發(fā)表評論
]]>
屏幕截圖工具LittleScreenCapturehttp://www.tkk7.com/sclsch/archive/2009/01/26/252587.htmlsclschsclschMon, 26 Jan 2009 10:15:00 GMThttp://www.tkk7.com/sclsch/archive/2009/01/26/252587.htmlhttp://www.tkk7.com/sclsch/comments/252587.htmlhttp://www.tkk7.com/sclsch/archive/2009/01/26/252587.html#Feedback0http://www.tkk7.com/sclsch/comments/commentRss/252587.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/252587.html 下載地址/Files/sclsch/LittleScreenCapture.rar

sclsch 2009-01-26 18:15 發(fā)表評論
]]>
自定義下拉框(初版)http://www.tkk7.com/sclsch/archive/2008/10/28/237215.htmlsclschsclschTue, 28 Oct 2008 12:57:00 GMThttp://www.tkk7.com/sclsch/archive/2008/10/28/237215.htmlhttp://www.tkk7.com/sclsch/comments/237215.htmlhttp://www.tkk7.com/sclsch/archive/2008/10/28/237215.html#Feedback0http://www.tkk7.com/sclsch/comments/commentRss/237215.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/237215.html     首先定義一個接口,用來取下拉框的數(shù)據(jù)。
   
   1package com.ssh.tag;
   
2.
   
3import java.util.List;
   
4.
   
5/** 
   6.  * 
@author 孫程亮 E-mail:sclsch@188.com 
   7.  * 
@version 創(chuàng)建時間:Oct 27, 2008 6:59:05 PM
   8.  * 取得下拉框數(shù)據(jù)接口 
   9.  
*/
  
10public interface SelectorInterface {
  
11.   public List getVableValueList();
  
12. }
   
    如果哪個業(yè)務(wù)層service需要增加下拉框的功能,就需要實(shí)現(xiàn)它。
例如:
  
   1package com.ssh.entity.board.service;
   
2.
   
3import java.util.ArrayList;
   
4import java.util.List;
   
5.
   
6import com.ssh.common.vo.ValueLabelBean;
   
7import com.ssh.entity.board.dao.IBoardDao;
   
8import com.ssh.entity.board.model.Board;
   
9import com.ssh.tag.SelectorInterface;
  
10import com.sun.java_cup.internal.internal_error;
  
11.
  
12/**
  13.  * 
@author 孫程亮 E-mail:sclsch@188.com
  14.  * 
@version 創(chuàng)建時間:Sep 4, 2008 6:36:22 PM
  15.  
*/
  
16public class BoardServiceImpl implements IBoardService,SelectorInterface{
  
17.     private IBoardDao boardDao;
  
18.
  
19.     public void addBoard(Board b) {
  
20.        boardDao.addBorad(b);
  
21.     }
  
22.
  
23.     public IBoardDao getBoardDao() {
  
24.         return boardDao;
  
25.     }
  
26.
  
27.     public void setBoardDao(IBoardDao boardDao) {
  
28.         this.boardDao = boardDao;
  
29.     }
  
30.
  
31.     public List getAllBoards() {
  
32.         return this.boardDao.getAllBoards();
  
33.     }
  
34.     /**
  35.      * 用來實(shí)現(xiàn)下拉框的方法,
  36.      * 把下拉數(shù)據(jù)存放在ValuLabelBean中,再存放在list中返回
  37.      * 給自定義標(biāo)簽。
  38.      * 
@return 下拉數(shù)據(jù)集合
  39.      
*/
  
40.     public List getVableValueList() {
  
41.         List list = this.boardDao.getAllBoards();
  
42.         List valueLableList = new ArrayList();
  
43.         for(int i=0;i<list.size();i++){
  
44.           Board board = (Board)list.get(i);
  
45.           ValueLabelBean vlb = new ValueLabelBean();
  
46.           vlb.setValue(board.getId().toString());
  
47.           vlb.setLabel(board.getName());
  
48.           valueLableList.add(vlb);
  
49.         }
  
50.         return valueLableList;
  
51.     }
  
52. }
    注意數(shù)據(jù)必須放在ValueLabelBean中,label表示下拉框顯示的數(shù)據(jù),value表示下拉框的value值,下面是ValueLabelBean
這個bean:
   1package com.ssh.common.vo;
   
2.
   
3import java.io.Serializable;
   
4.
   
5/**
   6.  * 
@author 孫程亮 E-mail:sclsch@188.com
   7.  * 
@version 創(chuàng)建時間:Oct 27, 2008 7:00:36 PM
   8.  
*/
   
9public class ValueLabelBean implements Serializable {
  
10.     private String value;
  
11.     private String label;
  
12.
  
13.     public String getValue() {
  
14.         return value;
  
15.     }
  
16.
  
17.     public void setValue(String value) {
  
18.         this.value = value;
  
19.     }
  
20.
  
21.     public String getLabel() {
  
22.         return label;
  
23.     }
  
24.
  
25.     public void setLabel(String label) {
  
26.         this.label = label;
  
27.     }
  
28. }

   下面就是寫tag了,暫時設(shè)置了三個屬性 tagId,serviceBean和title,
tagId:select 的 id 屬性值。
serviceBean:對應(yīng)于spring容器中service的id。
title:select的默認(rèn)選中項(xiàng)。
   1package com.ssh.tag;
   
2.
   
3import java.io.IOException;
   
4import java.lang.reflect.Method;
   
5import java.util.List;
   
6.
   
7import javax.servlet.jsp.JspException;
   
8import javax.servlet.jsp.tagext.TagSupport;
   
9.
  
10import org.springframework.context.support.AbstractApplicationContext;
  
11import org.springframework.util.StringUtils;
  
12import org.springframework.web.context.WebApplicationContext;
  
13import org.springframework.web.context.support.WebApplicationContextUtils;
  
14import org.springframework.web.util.JavaScriptUtils;
  
15import com.ssh.common.util.*;
  
16import com.ssh.entity.board.service.IBoardService;
  
17import com.sun.org.apache.xml.internal.utils.ObjectPool;
  
18import com.ssh.common.vo.*;
  
19import com.ssh.tag.*;
  
20/**
  21.  * 
  22.  * 
@author 孫程亮 E-mail:sclsch@188.com
  23.  * 
@version 創(chuàng)建時間:Oct 25, 2008 10:22:18 AM
  24.  
*/
  
25public class SelectorTag extends TagSupport {
  
26.     
  
27.     private String tagId;      //select's id
  28.     private String serviceBean;//service
  29.     private String title;      //select's title
  30.     
  
31.     public int doEndTag() throws JspException {
  
32.       WebApplicationContext applicationContext =  WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
  
33.       SelectorInterface selectorInterface = (SelectorInterface)applicationContext.getBean(serviceBean);
  
34.       List list1 = selectorInterface.getVableValueList();
  
35.       //List list = ServiceLocator.getSelectorService(serviceBean).getVableValueList();
  36.       StringBuffer sBuffer = new StringBuffer();
  
37.       sBuffer.append("<select id='"+this.tagId);
  
38.
  
39.       sBuffer.append("'>");
  
40.       if(!StringUtil.isBlank(title)){
  
41.           sBuffer.append("<option value='-1' selected>"+title+"</option>");
  
42.       }
  
43.       for(int i=0;i<list1.size();i++){
  
44.         ValueLabelBean vlb =  (ValueLabelBean)list1.get(i);
  
45.         sBuffer.append("<option value='"+vlb.getValue()+"'>"+vlb.getLabel()+"</option>");
  
46.       }
  
47.       sBuffer.append("</select>");
  
48.       try {
  
49.         pageContext.getOut().println(sBuffer.toString());
  
50.     } catch (IOException e) {
  
51.         // TODO Auto-generated catch block
  52.         e.printStackTrace();
  
53.     }
  
54.       return EVAL_PAGE;
  
55.     }
  
56.     public void setTagId(String tagId) {
  
57.         this.tagId = tagId;
  
58.     }
  
59.     public void setServiceBean(String serviceBean) {
  
60.         this.serviceBean = serviceBean;
  
61.     }
  
62.     public void setTitle(String title) {
  
63.         this.title = title;
  
64.     }
  
65. }

在標(biāo)簽中可以用WebApplicationContextUtils來得到context,曾一度起了彎路,想到用一個工具類加載容器,倒也能實(shí)現(xiàn),也想到用反射,但是行不通的。 看來變通一下,可能會少走很多彎路。
   下面是tld文件:
<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE taglib PUBLIC
     "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
     "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">

 <taglib>

     <tlib-version>1.0</tlib-version>
     <jsp-version>1.0</jsp-version>
     <short-name>sclschTag</short-name>
     <description>sclschTag</description>

     <tag>
         <name>selectorTag</name>
         <tag-class>com.ssh.tag.SelectorTag</tag-class>
         <body-content>JSP</body-content>
         <description>
         </description>
         <attribute>
             <name>tagId</name>
             <required>true</required>
             <rtexprvalue>true</rtexprvalue>
         </attribute>

         <attribute>
             <name>serviceBean</name>
             <required>true</required>
             <rtexprvalue>true</rtexprvalue>
         </attribute>
         <attribute>
             <name>title</name>
             <required>false</required>
             <rtexprvalue>true</rtexprvalue>
         </attribute>
     </tag>

 </taglib>
最后就剩頁面了:
  <%@ page language="java" contentType="text/html; charset=UTF-8"
     pageEncoding
="UTF-8"%>
 
<%@ taglib uri="/WEB-INF/tld/selectorTag.tld" prefix="sclsch"%>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
 
<head>
 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
<title>mytag(sclsch@188.com)</title>
 
</head>
 
<body>
 
<sclsch:selectorTag tagId='myid' title="--請選擇--" serviceBean="boardService" />
 
</body>
 
</html>

    好了,盡管這個tag很簡陋,但為以后省了不少工,只要在業(yè)務(wù)層實(shí)現(xiàn)一個SelectorInterface接口,在頁面上擺個標(biāo)簽就可以了。我剛學(xué)標(biāo)簽的編寫,有什么不足請指正,如果有更好的設(shè)計一定告訴我額。




sclsch 2008-10-28 20:57 發(fā)表評論
]]>
如何控制css居中?http://www.tkk7.com/sclsch/archive/2008/10/05/232552.htmlsclschsclschSun, 05 Oct 2008 13:00:00 GMThttp://www.tkk7.com/sclsch/archive/2008/10/05/232552.htmlhttp://www.tkk7.com/sclsch/comments/232552.htmlhttp://www.tkk7.com/sclsch/archive/2008/10/05/232552.html#Feedback3http://www.tkk7.com/sclsch/comments/commentRss/232552.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/232552.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 
<HEAD>
  
<style type="text/css">

      * 
{
    margin
: 0px;
    padding
: 0px;
    
}
     body 
{
    font-family
: Arial, Helvetica, sans-serif;
    font-size
: 12px;
    margin
: 0px auto;
    height
: auto;
    width
: 760px;
    border
:1px #66CCFF solid;
   
    
}
    .header 
{
    height
: 100px;
    width
: 760px;
    background-image
: url(header.jpg);
    background-repeat
: no-repeat;
    margin
:0px 0px 3px 0px;
    border
:1px #66CCFF solid;
     
    
}

    .contentleft 
{
    height
: 250px;
    width
: 150px;
    font-size
: 14px;
    list-style-type
: none;
    float
:left;
    border
:1px #66CCFF solid;

    
}
    .contentleft li 
{
    float
:left;
    
}
    .contentleft li a
{
    color
:#000000;
    text-decoration
:none;
    padding-top
:4px;
    display
:block;
    width
:97px;
    height
:22px;
    text-align
:center;
    background-color
: #009966;
    margin-left
:2px;
    
}
    .contentleft li a:hover
{
    border
:1px #66CCFF solid;
    color
:#FFFFFF;
    
}
    .content 
{
    height
:auto;
    width
: 760px;
    line-height
: 1.5em;
    padding
: 10px;
    border
:1px #66CCFF solid;
    
}
    .content p 
{
    text-indent
: 2em;
    
}
    .content h3 
{
    font-size
: 16px;
    margin
: 10px;
    
}

    .footer 
{
    height
: 50px;
    width
: 760px;
    line-height
: 2em;
    text-align
: center;
    background-color
: #009966;
    padding
: 10px;
    border
:1px #66CCFF solid;
    
}
    .contentright
{
        height
: 250px;
        width
: 580px;
        font-size
: 14px;
        list-style-type
: none;
        border
:1px #66CCFF solid;
        float
:right;
    
}
    .logo
{
      background-image
: url(scltemp.jpg);
      height
: 100px;
      width
: 75px;

    
}

  
</style>
   
  
<TITLE> New Document </TITLE>
  
<META NAME="Generator" CONTENT="EditPlus">
  
<META NAME="Author" CONTENT="">
  
<META NAME="Keywords" CONTENT="">
  
<META NAME="Description" CONTENT="">
 
</HEAD>

 
<BODY>
<div class="header">
  
<div class="logo"></div>
</div>

<div class="content">
    
<div class="contentleft">
    
<li><href="#">首 頁</a></li>
    
<li><href="#">文 章</a></li>
    
<li><href="#">相冊</a></li>
    
<li><href="#">Blog</a></li>
    
<li><href="#">論 壇</a></li>
    
<li><href="#">幫助</a></li>
    
</div>
    
<div class="contentright">
    
<h3>前言</h3>
    
<p>第一段內(nèi)容</p>
    
<h3>理解CSS盒子模式</h3>
    
<p>第二段內(nèi)容</p>
    
</div>
</div>

<div class="footer">
<p>關(guān)于華升 | 廣告服務(wù) | 華升招聘 | 客服中心 | Q Q留言 | 網(wǎng)站管理 | 會員登錄 | 購物車</p><p>Copyright &copy;2006 - 2008 Tang
Guohui. All Rights Reserved
</p>
</div>
 
</BODY>
</HTML>
另外,還有很多不完美的地方,請指點(diǎn)一下!



sclsch 2008-10-05 21:00 發(fā)表評論
]]>
javascript實(shí)現(xiàn)的樹型下拉框改進(jìn)版http://www.tkk7.com/sclsch/archive/2008/09/28/231624.htmlsclschsclschSun, 28 Sep 2008 03:20:00 GMThttp://www.tkk7.com/sclsch/archive/2008/09/28/231624.htmlhttp://www.tkk7.com/sclsch/comments/231624.htmlhttp://www.tkk7.com/sclsch/archive/2008/09/28/231624.html#Feedback0http://www.tkk7.com/sclsch/comments/commentRss/231624.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/231624.html 代碼如下:(如果有更好的方法,請留言,有待改進(jìn))
   
 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2   <html xmlns="http://www.w3.org/1999/xhtml">
 3    <head>
 4     <title> javascript樹型菜單 author:sclsch@188.com</title>
 5     <meta name="generator" content="editplus" />
 6     <meta name="author" content="" />
 7     <meta name="keywords" content="" />
 8     <meta name="description" content="" />
 9     <script type="text/javascript">
10       var data =new Array();
11      
12       data[0]= {id:'0',pid:'1',text:'河北'};
13       data[1]= {id:'1',pid:'-1',text:'中國'};
14       data[2]= {id:'2',pid:'6',text:'莫斯科'};
15       data[3]= {id:'3',pid:'0',text:'邯鄲'};
16       data[4]= {id:'4',pid:'0',text:'石家莊'};
17       data[5]= {id:'5',pid:'3',text:'邯鄲縣'};
18       data[6]= {id:'6',pid:'-1',text:'俄羅斯'};
19       data[7]= {id:'7',pid:'5',text:'孫程亮 sclsch@188.com'};
20 
21      function TreeSelector(item,data,rootId){
22         this._data = data;
23         this._item = item;
24         this._rootId = rootId;
25 
26      }
27      TreeSelector.prototype.createTree = function(){
28          var  len =this._data.length;
29          forvar i= 0;i<len;i++){
30            if ( this._data[i].pid == this._rootId){
31               this._item.options.add(new Option(".."+this._data[i].text,this._data[i].id));
32                   for(var j=0;j<len;j++){
33                     this.createSubOption(len,this._data[i],this._data[j]);
34                   
35                   }  
36            }
37         }
38      }
39       
40      TreeSelector.prototype.createSubOption = function(len,current,next){
41             var blank = "..";
42             if ( next.pid == current.id){
43                  intLevel =0;
44                  var intlvl =this.getLevel(this._data,this._rootId,current);
45                  for(a=0;a<intlvl;a++)
46                     blank += "..";
47                  blank += "├-";
48                  this._item.options.add(new Option(blank + next.text,next.id));
49                   
50                  for(var j=0;j<len;j++){
51                    this.createSubOption(len,next,this._data[j]);
52                  
53                  }   
54                  
55             }
56      }
57 
58      TreeSelector.prototype.getLevel = function(datasources,topId,currentitem){
59          
60          var pid =currentitem.pid;
61          if( pid !=topId)
62          {
63            for(var i =0 ;i<datasources.length;i++)
64            {
65               if( datasources[i].id == pid)
66               {
67                  intLevel ++;
68                  this.getLevel(datasources,topId,datasources[i]);
69               }
70            }  
71          }
72          return intLevel;
73     }
74 
75     </script>
76    </head>
77 
78    <body>
79     <select id="myselect">
80   </select>
81   <script language=javascript type="text/javascript">
82     var ts = new TreeSelector(document.getElementById("myselect"),data,-1);
83     ts.createTree();
84   </script>
85    </body>
86   </html>



sclsch 2008-09-28 11:20 發(fā)表評論
]]>
js控制checkboxhttp://www.tkk7.com/sclsch/archive/2007/10/25/155863.htmlsclschsclschThu, 25 Oct 2007 06:28:00 GMThttp://www.tkk7.com/sclsch/archive/2007/10/25/155863.htmlhttp://www.tkk7.com/sclsch/comments/155863.htmlhttp://www.tkk7.com/sclsch/archive/2007/10/25/155863.html#Feedback0http://www.tkk7.com/sclsch/comments/commentRss/155863.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/155863.html閱讀全文

sclsch 2007-10-25 14:28 發(fā)表評論
]]>
js顯示當(dāng)前日期http://www.tkk7.com/sclsch/archive/2007/09/12/144635.htmlsclschsclschWed, 12 Sep 2007 14:51:00 GMThttp://www.tkk7.com/sclsch/archive/2007/09/12/144635.htmlhttp://www.tkk7.com/sclsch/comments/144635.htmlhttp://www.tkk7.com/sclsch/archive/2007/09/12/144635.html#Feedback0http://www.tkk7.com/sclsch/comments/commentRss/144635.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/144635.html
date.js:
 function writeDateInfo(){
        var day
="";
        var month
="";
        var ampm
="";
        var ampmhour
="";
        var myweekday
="";
        var year
="";
        mydate
=new Date();
        myweekday
=mydate.getDay();
        mymonth
=mydate.getMonth()+1;
        myday
= mydate.getDate();
        myyear
= mydate.getYear();
        year
=(myyear > 200? myyear : 1900 + myyear;
        
if(myweekday == 0)
        weekday
=" 星期日";
        
else if(myweekday == 1)
        weekday
=" 星期一";
        
else if(myweekday == 2)
        weekday
=" 星期二";
        
else if(myweekday == 3)
        weekday
=" 星期三";
        
else if(myweekday == 4)
        weekday
=" 星期四";
        
else if(myweekday == 5)
        weekday
=" 星期五";
        
else if(myweekday == 6)
        weekday
=" 星期六";
        document.write(year
+""+mymonth+""+myday+""+weekday);
    }
  


頁面:
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script type="text/javascript" src="${ctx}/scripts/date.js"></script>

<div id="date"><script>writeDateInfo();</script></div>


sclsch 2007-09-12 22:51 發(fā)表評論
]]>
hibernate多對一關(guān)系的配置及操作http://www.tkk7.com/sclsch/archive/2007/07/10/129414.htmlsclschsclschTue, 10 Jul 2007 12:04:00 GMThttp://www.tkk7.com/sclsch/archive/2007/07/10/129414.htmlhttp://www.tkk7.com/sclsch/comments/129414.htmlhttp://www.tkk7.com/sclsch/archive/2007/07/10/129414.html#Feedback1http://www.tkk7.com/sclsch/comments/commentRss/129414.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/129414.html閱讀全文

sclsch 2007-07-10 20:04 發(fā)表評論
]]>
js表單驗(yàn)證http://www.tkk7.com/sclsch/archive/2007/07/10/129380.htmlsclschsclschTue, 10 Jul 2007 08:29:00 GMThttp://www.tkk7.com/sclsch/archive/2007/07/10/129380.htmlhttp://www.tkk7.com/sclsch/comments/129380.htmlhttp://www.tkk7.com/sclsch/archive/2007/07/10/129380.html#Feedback0http://www.tkk7.com/sclsch/comments/commentRss/129380.htmlhttp://www.tkk7.com/sclsch/services/trackbacks/129380.html這個是js

 1   <script type="text/javascript">
 2     function checkForm(){
 3        var section =  document.getElementById('section').value;
 4        var page =  document.getElementById('page').value;
 5           if (section==""){
 6             alert("請輸入章節(jié)");
 7             return false;
 8             }
 9           else if(page==""){
10             alert("請輸入頁碼");
11             return false;
12             }
13           myform.submit();
14     }
15   </script>
這個是表單
 1             <form name="myform" action="searchBySectionAndPage.do" mothd="post">
 2                 <table>
 3                     <tr>
 4                         <td>
 5                             章節(jié)
 6                         </td>
 7                         <td>
 8                             <input type="text" name="section">
 9                         </td>
10                     </tr>
11                     <tr>
12                         <td>
13                             頁碼
14                         </td>
15                         <td>
16                             <input type="text" name="page">
17                         </td>
18                     </tr>
19                     <tr>
20                         <td>
21                             <input type="reset" value="重置">
22                         </td>
23                         <td>
24                             <input type="button" value="確定" onclick="return checkForm();">
25                         </td>
26                     </tr>
27                 </table>
28             </form>

js很讓我頭痛,備注一下.



sclsch 2007-07-10 16:29 發(fā)表評論
]]>
主站蜘蛛池模板: 亚洲人成电影网站色www| 亚洲va久久久噜噜噜久久男同| 无码高潮少妇毛多水多水免费| 野花高清在线观看免费3中文 | 黄页网站免费观看| 成人影片麻豆国产影片免费观看| 一二三四视频在线观看中文版免费 | 日本大片在线看黄a∨免费| 国产一区二区三区在线免费| 亚洲福利在线播放| 亚洲精品夜夜夜妓女网| 中文字幕亚洲免费无线观看日本| 日本亚洲免费无线码| 免费看一级一级人妻片 | 国产成人高清亚洲| 久久久久久a亚洲欧洲AV| 亚洲免费在线观看视频| 99亚洲乱人伦aⅴ精品| 国产精品偷伦视频免费观看了| 日本免费一区二区三区四区五六区| 99久久精品日本一区二区免费 | 日韩免费高清一级毛片| GOGOGO高清免费看韩国| 久久国产乱子伦精品免费强| 1024免费福利永久观看网站| 久久亚洲2019中文字幕| 亚洲蜜芽在线精品一区| 一级做受视频免费是看美女 | 亚洲中文字幕久久无码| 一区二区三区AV高清免费波多| 四虎在线视频免费观看视频| gogo全球高清大胆亚洲| 亚洲国产精品久久66| 亚洲国产精品免费观看| 久久九九AV免费精品| 青青青国产免费一夜七次郎| 亚洲色无码专区在线观看| 精品日韩99亚洲的在线发布| 春意影院午夜爽爽爽免费| 性感美女视频在线观看免费精品| 亚洲午夜福利精品久久|