- 博客(11)
- 收藏
- 关注
转载 java删除文件夹
1. package book.io; 2. 3. import java.io.File; 4. 5. /** 6. * 7. * @author XWZ 8. * 2007-11-27 9. * 删除文件或目录 10. */ 11. public cla
2009-06-13 11:24:00
5462
5
原创 数据库常用操作
--字符串替换update 表 set 字段=left(字段,charindex(-,字段)-1)update 表 set 字段=substring(字段,1,charindex(-,字段)-1) 2: left 3: stuff
2008-07-25 11:43:00
449
转载 js常用判断
//去左空格;function ltrim(s){ return s.replace( /^/s*/, "");}//去右空格;function rtrim(s){ return s.replace( //s*$/, "");}//去左右空格;function trim(s){ return rtrim(ltrim(s));}/
2008-06-24 17:09:00
502
转载 父窗口传递信息给子窗口
function output(){//获取父窗口的文本信息赋值给textvar text = document.abc.text.value;//打开子窗口,并且把操作句柄赋值给win变量,以下所有操作都是针对win对象的var win = window.open("","mywin", "menubar=no,width=400,height=100,resizeabl
2008-06-24 16:57:00
1705
1
转载 js层拖动
<!-- function beginDrag(elementToDrag,event){ //计算元素原左上角与鼠标的距离 //moveHandler要这值 /*计算对象与鼠标之间的距离,x,y坐标*/ var dela
2008-06-24 16:52:00
1006
2
转载 获得对象的绝对坐标
找了好久,终于有个好例子。给大家分享~!//获取元素的纵坐标function getTop(e){var offset=e.offsetTop;if(e.offsetParent!=null) offset+=getTop(e.offsetParent);return offset;}//获取元素的横坐标function getLef
2008-06-24 16:18:00
531
转载 Java中对文件的操作
1。新建目录<%String filePath="c:/aaa/";filePath=filePath.toString();//中文转换java.io.File myFilePath=new java.io.File(filePath);if(!myFilePath.exists())myFilePath.mkdir();%>2。新建文件<%S
2008-06-24 16:15:00
679
1
转载 java字符串替换
public class myreplace { public myreplace() { } public String replace(String line, String oldString,String newString){ if (line == null) { return null; }
2008-06-24 16:05:00
2003
1
原创 jspsmartupload简单用法以及将路径存入数据库
upload2.jsp上传文件: 上传图片:upload3.jsptry{String str_path = pageContext.getServletContext().getRealPath("/")+"WebRoot//temp//
2008-06-24 16:03:00
1302
原创 cos上传,并生成缩略图
<%//设置POST请求的内容最大字节为10M,该类用于解析HTTP请求MultipartParser mp = new MultipartParser(request, 10*1024*1024);String driver = "com.mysql.jdbc.Driver";String url = "jdbc:mysql://192.1
2008-06-24 15:59:00
1634
转载 jsp图片验证码
<%!Color getRandColor(int fc,int bc){ //给定范围获得随机颜色Random random = new Random();if(fc>255)fc=255;if(bc>255)bc=255;int r=fc+random.nextInt(bc-fc);int g=fc+random.nextInt(bc-fc);int b=fc+
2008-06-23 11:04:00
435
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人