类 GetTextFromHtmlMethod
java.lang.Object
com.publiccms.common.base.BaseMethod
com.publiccms.views.method.tools.GetTextFromHtmlMethod
- 所有已实现的接口:
freemarker.template.TemplateMethodModel,freemarker.template.TemplateMethodModelEx,freemarker.template.TemplateModel
getTextFromHtml 获取html中的文本
参数列表
parameter list
パラメータリスト
- html内容
返回结果
string:文本结果
使用示例
usage example
使用例
${getTextFromHtml('<a href="http://www.publiccms.com/">publiccms</a>')}
<script>
$.getJSON('${site.dynamicPath}api/method/getTextFromHtml?parameters=<a href="http://www.publiccms.com/">publiccms</a>', function(data){
console.log(data);
});
</script>
-
字段概要
从类继承的字段 com.publiccms.common.base.BaseMethod
log从接口继承的字段 freemarker.template.TemplateModel
NOTHING -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明intboolean从类继承的方法 com.publiccms.common.base.BaseMethod
exec, execute, getBoolean, getDate, getDouble, getInteger, getIntegerArray, getLong, getLongArray, getMap, getModel, getName, getShort, getString, getStringArray, httpEnabled, setName
-
构造器详细资料
-
GetTextFromHtmlMethod
public GetTextFromHtmlMethod()
-
-
方法详细资料
-
execute
public Object execute(List<freemarker.template.TemplateModel> arguments) throws freemarker.template.TemplateModelException - 指定者:
execute在类中BaseMethod- 抛出:
freemarker.template.TemplateModelException
-
needAppToken
public boolean needAppToken()- 指定者:
needAppToken在类中BaseMethod- 返回:
- whether to need app token
-
minParametersNumber
public int minParametersNumber()- 指定者:
minParametersNumber在类中BaseMethod- 返回:
- min parameters number
-