- 浏览: 4326 次
- 性别:
- 来自: 武汉
最新评论
文章列表
package com.qlsx.test;
import java.util.ArrayList;
import java.util.List;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
public class GetXML {
Document document;
Element root;
// String pat ...
js数组操作大全
shift:删除原数组第一项,并返回删除元素的值;如果数组为空则返回undefined
var a = [1,2,3,4,5];
var b = a.shift(); //a:[2,3,4,5] b:1
unshift:将参数添加到原数组开头,并返回数组的长度
var a = [1,2,3,4,5];
var b = a.unshift(-2,-1); //a:[-2,-1,1,2,3,4,5] b:7
注:在IE6.0下测试返回值总为undefined,FF2.0下测试返回值为7,所以这个方法的返回值不可靠,需要用返回值时可用splice代替本方法来使用。
po ...
function pop(){
$.ligerDialog.prompt('添加环保知识分类', function (yes,value) {
if(yes){
loreClass(value);
}
});
}
function loreClass(category){
$.ajax({
type:"post",
url:"<%=basePath%>Hb_classifyServlet",
data:"b=save&category="+encodeURI ...
<c:choose>
<c:when test="${maxPage == 0}">
<div align="center"><h3><font color="red">没有数据!!!!!</font></h3></div>
</c:when>
<c:otherwise>
<table width="100%" bgcolor="whitesmoke" b ...
因为用到list,要去除重复数据,尝试了几种方法。记录于此。。。
SQL语句去重复
select distinct(origin) from zw_text ;
测试数据:
List<string> li1 = new List<string> { "8", "8", "9", "9" ,"0","9"};
List<string> li2 = new List<string> {"张三","张 ...
<div style="width: 300px; height: 24px; border: 0px;overflow: hidden; text-overflow:ellipsis; white-space:nowrap">
<a href="<%=basePath %>ZwServletb=findById&contentId=${zwlist.contentId }" style="line-height:24px;">${zwlist.title }</a>
</d ...
public class UploadServlet extends HttpServlet {
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html; charset=utf-8");
System.out.println("我怎么进来了");
//得到全局对象,此对象就是网页中的 ...
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
int a = 1 ;
//得到全局对象,此对象就是网页中的内置对象之一:application
ServletContext application = this.getServletContext() ;
//创建一个文件工厂对象
DiskFileItemFactory factory = new DiskFileItemFact ...