<html:form action="example1" ajaxRef="example1"> First Name: <html:text property="firstName" size="25" value="Frank" /> <br> Last Name: <html:text property="lastName" size="25" value="Zammetti" /> <br> <html:button property="button" value="Click to do Ajax!" ajaxRef="button" /></html:form>Result:<br><span id="example1_resultLayer"> </span>
<!DOCTYPE ajaxConfig PUBLIC "ajaxConfig" "ajaxConfig"><ajaxConfig> <!-- Define a custom request handler that generates XML for example 2 --> <handler name="CustomXMLGenerator" type="request"> <function>customGenerateXML</function> <location>customXMLGenerator.js</location> </handler> <!-- Configuration for example 1 --> <form ajaxRef="example1"> <element ajaxRef="button"> <event type="onclick"> <requestHandler type="std:QueryString"> <target>example1.do</target> <parameter>firstName=firstName,lastName=lastName</parameter> </requestHandler> <responseHandler type="std:InnerHTML"> <parameter>example1_resultLayer</parameter> </responseHandler> </event> </element> </form></ajaxConfig>
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18