s:autocompleter学习

1.web应用中导入包jsonplugin.jar

2.在struts.xml中该action的package继承json-default,并<resulttype="json"><paramname="root">resultList</param></result>

3.jsp中<s:headtheme="ajax"debug="true"/>

<s:urlid="ajax"value="/company/messageName.do"/>

<s:autocompletertheme="ajax"name="message.name"href="%{ajax}"

autoComplete="true"showDownArrow="false"

forceValidOption="true"loadOnTextChange="true"

loadMinimumCount="0"size="10"/>

相关推荐