flash 如何接受 jsp的传值
<%@pagelanguage="java"import="java.util.*"pageEncoding="GB18030"%><%System.out.printl...
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%
System.out.println("----- connected -----");
// 在和 flash 通信时,请保证字符集为 UTF-8,否则传输中文会产生乱码
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
out.print("HELLOWORLD");
%>
as
var scriptRequest:URLRequest = new URLRequest("http://127.0.0.1:8080/zz/index.jsp");
var scriptLoader:URLLoader = new URLLoader();
var scriptVars:URLVariables = new URLVariables();
scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful);
scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
scriptRequest.method = URLRequestMethod.POST;
scriptRequest.data = scriptVars;
scriptLoader.load(scriptRequest);
function handleLoadSuccessful(evt:Event):void {
Li.text=evt.target.data;
//llll.text="hdhhjhjhjhjjjjjjjjj";
Alert.show(evt.target.data);
}
///lible没有值 ?????????????????????
////////Alert.show(evt.target.data); 出 helloworld 展开
<%
System.out.println("----- connected -----");
// 在和 flash 通信时,请保证字符集为 UTF-8,否则传输中文会产生乱码
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
out.print("HELLOWORLD");
%>
as
var scriptRequest:URLRequest = new URLRequest("http://127.0.0.1:8080/zz/index.jsp");
var scriptLoader:URLLoader = new URLLoader();
var scriptVars:URLVariables = new URLVariables();
scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful);
scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
scriptRequest.method = URLRequestMethod.POST;
scriptRequest.data = scriptVars;
scriptLoader.load(scriptRequest);
function handleLoadSuccessful(evt:Event):void {
Li.text=evt.target.data;
//llll.text="hdhhjhjhjhjjjjjjjjj";
Alert.show(evt.target.data);
}
///lible没有值 ?????????????????????
////////Alert.show(evt.target.data); 出 helloworld 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询