flex向外部post传值方法
此部分的post传值是页面没有post表单的传值方法,只是将一个变量POST传给一个HTTP地址。 flex部分: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><mx:HTTPService showBusyCursor="true" id="getuser"? url="http://localhost/receivePost.php" method="post"> <mx:request> <username> ?{username} </username> </mx:request> </mx:HTTPService> <mx:Script> ………… 然后在init()中声明时注意 [Bindable] 调用有两种方式: 一、在某个函数内容 function test(){
} 二、在某个按钮上 <mx:Button x="84" y="101" label="登录" click="getuser.send()" fontSize="12" fontWeight="normal"/> PHP页面: $username = $_POST['username']; 本人是flex超级初学者,如何哪位看到此方法太幼稚还请多包涵,或者邮件告知我好的解决方法。liangjig@gmail.com 如果有和我类似的初学者有疑问也可以给我发邮件liangjig@gmail.com (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |