+ -
当前位置:首页 → 问答吧 → 使用 LoadVars读取服务器端有时候失灵

使用 LoadVars读取服务器端有时候失灵

时间:2011-03-25

来源:互联网

复制内容到剪贴板
代码:
button.onRelease=function()    
{
    sender=new LoadVars();   
    loader=new LoadVars();
    
    sender.username=input.text;        
    loader.onLoad=function(success)
    {
        if(success)        
        {
            display.text=loader.thevalue;            
        }
        delete loader;
    }    
    sender.sendAndLoad("http://127.1.1.1/test.aspx?date="+new Date().getTime(),loader,"post");        
}
在调试状态下,或者嵌入到ie下都是正确的,能够获取到服务器端传过来的数据。
但是另存为swf直接运行,或者存储到火狐下,都不能够获取到服务器端数据,该怎么处理

服务器代码(.net)
复制内容到剪贴板
代码:
string username= Request.Params["username"];
        Response.Write("thevalue=hello," + username);
        Response.End();

作者: popo0027   发布时间: 2011-03-25

注意安全沙箱

作者: flash023   发布时间: 2011-03-25