jQuery autocomplate 自扩展插件、自动完成示例代码(3)


<%@ page language="java" contentType="text/xml; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<words>
<c:if test="${fn:startsWith('abstruct', word)}">
<word>abstruct</word>
</c:if>
<c:if test="${fn:startsWith('anilazine', word)}">
<word>anilazine</word>
</c:if>
<c:if test="${fn:startsWith('appeared', word)}">
<word>appeared</word>
</c:if>
<c:if test="${fn:startsWith('autocytolysis', word)}">
<word>autocytolysis</word>
</c:if>
<c:if test="${fn:startsWith('apple', word)}">
<word>apple</word>
</c:if>
<c:if test="${fn:startsWith('boolean', word)}">
<word>boolean</word>
</c:if>
<c:if test="${fn:startsWith('break', word)}">
<word>break</word>
</c:if>
<c:if test="${fn:startsWith('bird', word)}">
<word>bird</word>
</c:if>
<c:if test="${fn:startsWith('blur', word)}">
<word>blur</word>
</c:if>
<c:if test="${fn:startsWith('call', word)}">
<word>call</word>
</c:if>
<c:if test="${fn:startsWith('class', word)}">
<word>class</word>
</c:if>
<c:if test="${fn:startsWith('card', word)}">
<word>card</word>
</c:if>
<c:if test="${fn:startsWith('dacnomania', word)}">
<word>dacnomania</word>
</c:if>
<c:if test="${fn:startsWith('document', word)}">
<word>document</word>
</c:if>
</words>


就是一个xml格式的文档,通过使用jstl表达式,用startsWith函数匹配,如果通过就显得在xml内容中,还有看到上面的contentType="text/xml; charset=UTF-8"了没有,是text/xml哦!这点要注意,如果不设置有的浏览器就不能解析了。
作者:hoojo
blog:

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdfdwj.html