类 HTMLUtil

java.lang.Object
com.sh.common.util.SHUtils
com.sh.common.util.HTMLUtil
直接已知子类:
AuthExHtml, ListTable, ModuleHtmlUtil, ModuleMobileHtmlUtil, ModulePreviewHtmlUtil

public class HTMLUtil extends SHUtils
Description: HTML帮助类 Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
  • 字段详细资料

    • scriptMap

      protected static Map<String,String> scriptMap
    • scriptFile

      protected static List<String> scriptFile
    • DEFAULT_CHARSET

      public static String DEFAULT_CHARSET
    • LOADJARFILE_CHARSET

      public static String LOADJARFILE_CHARSET
    • documentDomain

      public static String documentDomain
  • 构造器详细资料

    • HTMLUtil

      public HTMLUtil()
  • 方法详细资料

    • loadFile

      protected static void loadFile(String filePath)
      加载文件
      参数:
      filePath - String
    • loadFile

      protected static void loadFile(String fileName, File file)
      加载文件
      参数:
      fileName - String
      file - String
    • loadFile

      protected static void loadFile(String fileName, String filePath)
      加载文件
      参数:
      fileName - String
      filePath - String
    • getScriptFile

      protected static String getScriptFile(String key)
      获取JS文件
      参数:
      key - String
      返回:
      String
    • loadScript

      protected static void loadScript(File file)
      加载JS文件
      参数:
      file - JS文件
    • loadJarFile

      protected static void loadJarFile()
      从JAR包中去查找
    • getPagePanelStart

      public static String getPagePanelStart(jakarta.servlet.http.HttpServletRequest request)
    • getPagePanelStart

      public static String getPagePanelStart(jakarta.servlet.http.HttpServletRequest request, String flag)
    • getPagePanelEnd

      public static String getPagePanelEnd(jakarta.servlet.http.HttpServletRequest request)
    • getPagePanelEnd

      public static String getPagePanelEnd(jakarta.servlet.http.HttpServletRequest request, String flag)
    • getPageTitleStart

      public static String getPageTitleStart(jakarta.servlet.http.HttpServletRequest request, String title)
    • getPageTitleEnd

      public static String getPageTitleEnd(jakarta.servlet.http.HttpServletRequest request)
    • getPageControlPanelStart

      public static String getPageControlPanelStart(jakarta.servlet.http.HttpServletRequest request, String title)
    • getPageControlPanelStart

      public static String getPageControlPanelStart(jakarta.servlet.http.HttpServletRequest request, String title, String align, String icon)
    • getEndPrefix

      public static String getEndPrefix(jakarta.servlet.http.HttpServletRequest request)
    • getPageControlPanelEnd

      public static String getPageControlPanelEnd(jakarta.servlet.http.HttpServletRequest request)
    • getPageDataPanelStart

      public static String getPageDataPanelStart(jakarta.servlet.http.HttpServletRequest request)
    • getPageDataPanelStart

      public static String getPageDataPanelStart(jakarta.servlet.http.HttpServletRequest request, String flag)
    • getPageDataPanelEnd

      public static String getPageDataPanelEnd(jakarta.servlet.http.HttpServletRequest request)
    • getPageDataPanelEnd

      public static String getPageDataPanelEnd(jakarta.servlet.http.HttpServletRequest request, String flag)
    • getPageQueryPanelStart

      public static String getPageQueryPanelStart(jakarta.servlet.http.HttpServletRequest request)
    • getPageQueryPanelStart

      public static String getPageQueryPanelStart(jakarta.servlet.http.HttpServletRequest request, String title)
    • getPageQueryPanelStart

      public static String getPageQueryPanelStart(jakarta.servlet.http.HttpServletRequest request, String title, String flag)
    • getPageQueryPanelEnd

      public static String getPageQueryPanelEnd(jakarta.servlet.http.HttpServletRequest request)
    • getPageNavigatePanelStart

      public static String getPageNavigatePanelStart(jakarta.servlet.http.HttpServletRequest request)
    • getPageNavigatePanelStart

      public static String getPageNavigatePanelStart(jakarta.servlet.http.HttpServletRequest request, String align)
    • getPageNavigatePanelEnd

      public static String getPageNavigatePanelEnd(jakarta.servlet.http.HttpServletRequest request)
    • getContainerStart

      public static String getContainerStart(String containerId)
    • getContainerEnd

      public static String getContainerEnd(String containerId)
    • parserElVar

      public static String parserElVar(jakarta.servlet.http.HttpServletRequest request, String html)
    • getSkinId

      public static String getSkinId(jakarta.servlet.http.HttpServletRequest request)
      皮肤
      参数:
      request - HttpServletRequest
      返回:
      String
    • getDefaultStyle

      public static String getDefaultStyle()
    • getDefaultStyle

      public static String getDefaultStyle(jakarta.servlet.http.HttpServletRequest request)
      获取系统样式
      参数:
      request - HttpServletRequest
      返回:
      String
    • getDefaultScript

      public static String getDefaultScript(jakarta.servlet.http.HttpServletRequest request, boolean tipInit)
      默认JS
      参数:
      request - HttpServletRequest
      tipInit - boolean
      返回:
      String
    • getDefaultScript

      public static String getDefaultScript(jakarta.servlet.http.HttpServletRequest request)
    • getDefaultScript

      public static String getDefaultScript()
    • getAjaxScript

      public static String getAjaxScript()
      AJAX相关JS
      返回:
      String
    • getDateScript

      public static String getDateScript()
      日期控件JS
      返回:
      String
    • getFileScript

      public static String getFileScript()
      加载文件脚本
      返回:
      String
    • getFileStyle

      public static String getFileStyle()
      获取文件样式
      返回:
      String
    • getHeaderCol

      public static String getHeaderCol(Header header, String containerId, String name, String desc)
      表头列
      参数:
      header - Header
      containerId - String
      name - String
      desc - String
      返回:
      String
    • getTip

      public static String getTip(String title, String message)
      提示
      参数:
      title - String
      message - String
      返回:
      String
    • getPopchecktree

      public static String getPopchecktree(String winId, String width, String height, String defaultText, String defaultValue, String eventId, String rootName, String data, String title, String objId, String objName)
      获取带checkbox的树
      参数:
      winId - String
      width - String
      height - String
      defaultText - String
      defaultValue - String
      eventId - String
      rootName - String
      data - String
      title - String
      objId - String
      objName - String
      返回:
      String
    • getListTable

      public static String getListTable()
      列表table标签
      返回:
      String
    • toIFrameForward

      public static String toIFrameForward(String msgType, String backUrl, String... msgStr)
      生成IFRAME_FORWARD页面内容
      参数:
      msgType - success/failure
      backUrl - 返回URL
      msgStr - 自定义参数
      返回:
      String
    • toMessageForward

      public static String toMessageForward(jakarta.servlet.http.HttpServletRequest request, String msgType, String... msgStr)
      生成MESSAGE页面
      参数:
      request - HttpServletRequest
      msgType - String
      msgStr - 数组
      返回:
      String
    • getHtmlText

      public static String getHtmlText(String html)
      获取HTML代码中的文本值
      参数:
      html - String
      返回:
      String
    • getButtonScript

      public static String getButtonScript(jakarta.servlet.http.HttpServletRequest request)
      获取图片按钮鼠标移入移出事件
      参数:
      request - HttpServletRequest
      返回:
      String
    • getButtonHtml

      public static String getButtonHtml(jakarta.servlet.http.HttpServletRequest request, String id, String className, String value, String onClick, String extHtml)
      获取按钮HTML
      参数:
      request - HttpServletRequest
      id - String
      className - 样式,在非图片button时有效
      value - 值
      onClick - 单击事件
      extHtml - 自定义
      返回:
      String
    • getHtmlDocType

      public static String getHtmlDocType(boolean isLoad)
      HTML文档类型
      参数:
      isLoad - boolean
      返回:
      String
    • getHtmlDocType

      public static String getHtmlDocType()
      HTML文档类型
      返回:
      String
    • convert2HtmlKeyword

      public static String convert2HtmlKeyword(String str)
      将字符串转换为HTML的属性值,主要是去掉引号特殊字符
      参数:
      str - String
      返回:
      String
    • convert2NavigateAttr

      public static String convert2NavigateAttr(String str)
      针对分页标签使用,要求:str是用单引号包括的字符串
      参数:
      str - String
      返回:
      String
    • main

      public static void main(String[] args)