【问题标题】:send post with AS 3.0使用 AS 3.0 发送帖子
【发布时间】:2011-01-31 07:50:54
【问题描述】:

我想在 flash 中提交一个表单并将用户发送到 html/php 中的另一个页面并获取该页面上的发布信息。我该怎么做?

【问题讨论】:

    标签: actionscript-3 form-post


    【解决方案1】:
    // create a URLRequest object with the target URL:
    var url : String = 'newpage.html';
    var urlRequest : URLRequest = new URLRequest(url);
    
    // create a URLVariables object and add all the values you want to send with their identifiers:
    var urlVariables : URLVariables = new URLVariables();
    urlVariables['formfieldId'] = 'formfieldValue';
    
    // add the urlVariables to the urlRequest
    urlRequest.data = urlVariables;
    
    // set the method to post (default is GET)
    urlRequest.method = URLRequestMethod.POST;
    
    // use navigateToURL to send the urlRequest, use '_self' to open in the same window
    navigateToURL(urlRequest, '_self');
    

    【讨论】:

      【解决方案2】:

      使用URLRequest

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-10-15
        • 2011-09-06
        • 2011-06-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-01-10
        相关资源
        最近更新 更多