Chinaunix首页 | 论坛 | 博客

acc

  • 博客访问: 792090
  • 博文数量: 170
  • 博客积分: 7011
  • 博客等级: 少将
  • 技术积分: 1660
  • 用 户 组: 普通用户
  • 注册时间: 2006-07-31 12:02
文章分类

全部博文(170)

文章存档

2014年(7)

2010年(2)

2009年(62)

2008年(25)

2007年(67)

2006年(7)

我的朋友

分类:

2007-10-04 07:03:58

 

package onlineexam;
import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.servlet.jsp.JspWriter;
public class Tools {
 
 public static String codestring(String s){//处理乱码的方法
  String str=s;
   try
      {
      byte b[]=str.getBytes("ISO-8859-1");
      str=new String(b);
      return str;
     }
    catch(Exception e)
     {
      return str;
     }
 }
 
 public static void showalert(String string, JspWriter out) throws IOException {//使用javascript在JSP中弹出窗口
  String str=string;
  out.println("");
 }
 
 public static void goback(JspWriter out) throws IOException {//使用javascript返回上级页面
  out.println("");
  
 }
 
 public static void redirect(String url,JspWriter out) throws IOException{//使用javascript打开新页面
  out.println("");
 }
 
 public static void close(JspWriter out) throws IOException{//使用javascript关闭当前页面,并且无提示.
  out.println("");
 }
 
 }

阅读(2190) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~