- 博客(10)
- 收藏
- 关注
js判断服务器文件是否存在
var urlImages=window.location.protocol + "//" + window.location.host + "<c:url value="/printTempImages/common/" />"; //判断图片是否存在 function checkimg(obj){ //alert(obj); var s; var xmlhttp...
2010-03-15 09:24:13
316
原创 java正则表达式学习
众所周知,在程序开发中,难免会遇到需要匹配、查找、替换、判断字符串的情况发生,而这些情况有时又比较复杂,如果用纯编码方式解决,往往会浪费程序员的时间及精力。因此,学习及使用正则表达式,便成了解决这一矛盾的主要手段。 大 家都知道,正则表达式是一种可以用于模式匹配和替换的规范,一个正则表达式就是由普通的字符(例如字符a到z)以及特殊字符(元字符)组成的文字模式,它 用以描述在查找文字主体时待匹配的...
2009-10-15 16:00:14
111
原创 java中文字符串按拼音排序代码
import java.util.*;import java.text.*;public class SortPinyin { /** * @param args */ public static void main(String[] args) { ...
2009-09-29 15:27:10
164
JList中右键选中行
JList中右键选中行实现MouseListener的方法 public void mousePressed(MouseEvent e) { if(e.getButton()==3){ int index=peoplePane.locationToIndex(e.getPoint()); peoplePane.s...
2009-09-27 10:32:42
415
java中截取String的某些字符
java中截取String字符串.假如原来字符串值为"张三!!zs0101" 通过下面的方法就可以得到a[0]="张三",a[1]="zs0101" public class split { public static void main(String[] args) { String s = new String( "张三!!zs0101" ); S...
2009-09-27 09:31:26
228
原创 通过js 向table添加或修改row及cell
//取得table对象 var tabObj = document.getElementById("tabTipResult"); //目前table有多少行 var rowCount = tabObj.rows.length; //每行有多少列 var cellCount = tabObj.rows(0).cells.le...
2009-09-15 10:15:59
184
原创 JS中 getElementById /Name /TagName 的应用
顾明思义,get-Element-By-Id,就是通过ID来设置/返回HTML标签的属性及调用其事件与方法。用这个方法基本上可以控制页面所有标签,条件很简单就是给每个标签分配一个ID号:document.getElementById("link").href;document.getElementById("link").target;document.getElementById("...
2009-09-15 10:12:41
232
原创 ResultSet转换成XML
import java.io.FileOutputStream;import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.ResultSetMetaData;import java.sql.SQLException;import jav...
2009-09-13 14:01:47
292
原创 portlet中ajax乱码解决方案
首先从表单中获取来的数据 var queryString="dhhm="+dhhm+"&dwmc="+dwmc+"&lbsj=" +lbsj+"&sqr="+sqr+"&bjlx="+bjlx+"&page="+page; 然后把quer
2009-09-10 16:22:31
210
原创 一个AJAX例子
网上看到的例子,便记录了下来,以供以后参考。原文地址:http://hi.baidu.com/casa2/blog/item/7a6bc1c684e81c1f9d163df5.html本例将在页面的参数以Get和POST两种方式传递到服务器,并回显到页面;本例共包括两个主要文件getAndPostExample.html和GetAndPostExample.java以及...
2009-09-09 14:47:45
169
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人