类 UHtml
java.lang.Object
com.gdxsoft.easyweb.utils.UHtml
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static intcombineFiles(String path, String ext, String savePathAndName) 将单元文件进行合并,例如js文件或css文件等static StringcreateListSplit(int iCurPage, int iPageSize, int iTotalRecords, String pageUrlRoot) Create a pagination divstatic StringcreateListSplit(IPageSplit pageSplit, String pageUrlRoot, String target, boolean isShowAsTable) 创建类似BBS类型的分页static StringcreateListSplitTable(int iCurPage, int iPageSize, int iTotalRecords, String pageUrlRoot) Create a pagination tablestatic StringgetHttpBase(javax.servlet.http.HttpServletRequest request) Get the base url from the HttpServletRequeststatic StringgetHttpBase(javax.servlet.http.HttpServletRequest request, String baseAdd) Get the base url from the HttpServletRequeststatic StringgetHttpBody(javax.servlet.http.HttpServletRequest request) Get http body contentstatic StringgetHttpBody(javax.servlet.http.HttpServletRequest request, String charset) Get http body contentstatic byte[]getHttpBodyBytes(javax.servlet.http.HttpServletRequest request) Get the request body contentstatic StringhtmlETag()static StringremoveHtmlAttributes(String html) 去除html标签属性(保留图片的src路径)static StringremoveHtmlEvents(String html) 去除html的 on事件 例如 onclick,onmousedown ..., 用于Html编辑器粘贴后去除static StringremoveHtmlTag(String html, String tagName) Remote the html tag
-
字段详细资料
-
MAP_COMBINE_FILES
-
-
构造器详细资料
-
UHtml
public UHtml()
-
-
方法详细资料
-
combineFiles
将单元文件进行合并,例如js文件或css文件等- 参数:
path- 路径ext- 扩展名savePathAndName- 保存路径- 返回:
- 0表示目录不存在
- 抛出:
Exception
-
getHttpBody
Get http body content- 参数:
request- HttpServletRequest (javax)- 返回:
- the http body string(UTF8)
- 抛出:
IOException
-
getHttpBody
public static String getHttpBody(javax.servlet.http.HttpServletRequest request, String charset) throws IOException Get http body content- 参数:
request- HttpServletRequest (javax)charset- The charset name- 返回:
- the http body string
- 抛出:
IOException
-
getHttpBodyBytes
public static byte[] getHttpBodyBytes(javax.servlet.http.HttpServletRequest request) throws IOException Get the request body content- 参数:
request-- 返回:
- 抛出:
IOException
-
getHttpBase
Get the base url from the HttpServletRequest- 参数:
request- the HttpServletRequest- 返回:
- the base url
-
getHttpBase
Get the base url from the HttpServletRequest- 参数:
request- the HttpServletRequestbaseAdd- the path of attachment- 返回:
- the base url
-
htmlETag
-
removeHtmlEvents
去除html的 on事件 例如 onclick,onmousedown ..., 用于Html编辑器粘贴后去除- 参数:
html-- 返回:
- 去除html的 on事件 例如 onclick,onmousedown ..., 用于Html编辑器粘贴后去除
-
removeHtmlAttributes
去除html标签属性(保留图片的src路径)- 参数:
html-- 返回:
- 去除html标签属性(保留图片的src路径)
-
removeHtmlTag
Remote the html tag- 参数:
html- the html stringtagName- the tag to delete (iframe, script ...)- 返回:
- the result
-
createListSplit
public static String createListSplit(IPageSplit pageSplit, String pageUrlRoot, String target, boolean isShowAsTable) 创建类似BBS类型的分页- 参数:
pageSplit- ListFrame分页参数pageUrlRoot- 根路径target- 连接窗口(_self,_blank ...)isShowAsTable- 是否以表格方式显示(兼容IE6)- 返回:
- 字符串
-
createListSplit
public static String createListSplit(int iCurPage, int iPageSize, int iTotalRecords, String pageUrlRoot) Create a pagination div- 参数:
iCurPage- the current pageiPageSize- the page sizeiTotalRecords- the total recordspageUrlRoot- the page url (../bbs/xxx/yy/{EXP}.html) the {EXP} is the page number replacement- 返回:
- the pagination html
-
createListSplitTable
public static String createListSplitTable(int iCurPage, int iPageSize, int iTotalRecords, String pageUrlRoot) Create a pagination table- 参数:
iCurPage- the current pageiPageSize- the page sizeiTotalRecords- the total recordspageUrlRoot- the page url (../bbs/xxx/yy/{EXP}.html) the {EXP} is the page number replacement- 返回:
- the pagination html(table)
-