ITeye博客

flex请求服务

yaoweinan · 2010-12-23 11:25 · flex · Web前端 · Markdown

flex页面:

其中:_url.action为用户定义的请求,该页面向struts2发送两个参数:userName,pswWord

Xml代码

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#f6f6f6" backgroundGradientColors="" fontSize="12">
<mx:Label text="用户名:" x="23" y="61" id="txt"/>
<mx:TextInput id="userName" x="77" y="59"/>

<mx:Label text="密码:" x="35" y="91"/>   
<mx:TextInput id="pswWord" x="77" y="89"/>   
    
<mx:Button label="提交" click='my_HS.send()' x="185" y="121"/>   
    
<mx:HTTPService id="my_HS" url="_url.action" method="post" >   
    <mx:request>   
        <userName>{userName.text}</userName>   
        <pswWord>{pswWord.text}</pswWord>   
    </mx:request>   
</mx:HTTPService>   

</mx:Application>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。