- 浏览: 35056 次
- 性别:
最新评论
文章列表
if(window.confirm("确定要删除吗")== true){frm.action=basePath+'/jquery/TmUserMainAction/ownerDel.do';frm.ownerId.value = ownerId;frm.submit();}if(window.confirm("确定要删除吗")== true){frm.action=basePath+'/jquery/TmUserMainAction/ownerDel.do';frm.ownerId.value = ownerId;frm.submit();}
- 2013-01-18 09:07
- 浏览 627
- 评论(0)
<script type="text/javascript">$(document).ready(function(){alert("123");$('a').click(function(){alert("连接了啊");$('.box').show();});$('.close').click(function(){alert("close");$('.box').hide();});$('.InputText').onMouseout(function(){alert("用户名不能为空&qu ...
- 2013-01-16 11:36
- 浏览 503
- 评论(0)
最近工作中用到jQuery插件,需要安装eclipse插件才能支持jQuery智能提示,在网上搜索了一下,常用的有三个插件支持jQuery的智能提示:
1.jQueryWTP
2.Spket
3.Aptana
在安装插件之前需要先安装eclipse,如果已经安装了eclipse,可以直接看 ...
- 2013-01-14 20:30
- 浏览 550
- 评论(0)
package numberguess;
import java.sql.*;
public class DataBase {
private Connection conn;
private Statement smt;
ResultSet rs;
private String MQ_USER_INFO;
public String getMQ_USER_INFO() {
return MQ_USER_INFO;
}
public void setMQ_USER_INFO(String mQUSERINFO) {
MQ_USER_INFO = mQUSE ...
- 2013-01-14 11:00
- 浏览 657
- 评论(0)
日期处理
to_date('2012-12-12 12:12:12', 'yyyy-mm-dd hh24:mi:ss');
PreparedStatement ps = new PreparedStatement();
StringBuffer sql= new StringBuffer();
sql.append("select * from table where id = ?");这里设置了一个"?"号,它的值暂时还不确定。
ps = conn.prepareStatement(sql.toString());将sql语句进行预编译.设置? ...
- 2013-01-07 17:41
- 浏览 546
- 评论(0)
首先在操作删除之前建立一个保存点
savepoint aa;
然后执行删除,比如删除学生表student;
delete from student;
执行回滚操作:
rollback to aa;
执行select * from student;则被删除的数据返回了
注意:提交之后的数据不能够返回.
truncate table student;
能够删除student中的数据。但是不会在日记中记录。删除时注意。优点是删除速度快。适合于删除大量数据
日期处理方式:to_char(datename, 'yyyy-mm-dd');
- 2013-01-06 16:53
- 浏览 579
- 评论(0)
String u = "中国"
u = new String(u.getBytes("iso-8859-1"), "gb2312");
可以将得到的u转化为符合中国汉字的字码
可以写一个类
package com.yyy.model;
public class Tools {
public static String toGB(String input){
String result=null;
try{
result = new String(input.ge ...
- 2012-12-31 18:12
- 浏览 534
- 评论(0)
login.jsp
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%& ...
- 2012-12-31 14:14
- 浏览 424
- 评论(0)
while(rs.next()){
UserBean ub = new UserBean();
ub.setUserId(rs.getInt(2));
ub.setUsername(rs.getString(3));
ub.setPasswd(rs.getString(4));
ub.setEmail(rs.getString(5));
ub.setGrade(rs.getInt(6));//数字是表示在数据表中第几列。
//ub.setGrade(rs.getInt("gr ...
- 2012-12-31 13:50
- 浏览 503
- 评论(0)
纯JSP用户登录系统
- 博客分类:
- jsp
login.jsp
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/" ...
login.jsp
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
...
- 2012-12-31 11:31
- 浏览 385
- 评论(0)
create table yyytestusers
(
userId int primary key ,
username varchar(20),
passwd varchar(20),
email varchar(30),
grade int)
--create sequence identity
--drop是删除identity
--drop sequence identity
insert into yyytestusers values(identity.nextval, 'yyy', '123',
'googole@google.com', 1)
...
- 2012-12-29 20:03
- 浏览 674
- 评论(0)
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy o ...
- 2012-12-29 19:44
- 浏览 758
- 评论(0)
/**
* @(#)Login.java
*
*
* @author
* @version 1.00 2012/12/25
*/
package com.tsinghua;
import javax.servlet.http.*;
import java.io.*;
public class Login extends HttpServlet{
public void doGet(HttpServletRequest req, HttpServletResponse res){
try{
//中文乱码
res.setCo ...
- 2012-12-29 19:43
- 浏览 385
- 评论(0)
<!-- 这是一个计算器 -->
<%@ page contentType="text/html; charset=gb2312" %>
<html>
<h1>计算器</h1>
<hr>
<script language = "javascript">
function checkNum(){
// alert("1");alert("0");
if(document.form ...
- 2012-12-29 19:35
- 浏览 2375
- 评论(0)