如何才能在Swf上的输入文本元件里填写数据,后点击Button,传递到Asp页面尼?
下面是Cngothic今天查阅资料整理以下几行代码!

FLASH 部分:

按钮元件名称:cngothic_button
文本框元件名称:cngothic_username

As 代码:
_root.cngothic_button.onRelease = function() {
 if (_root.cngothic_username.text != “”) {
  names = _root.cngothic_username.text;
  loadVariablesNum(”write.asp”, 0, “POST”);
 }
}

Asp 代码:

cngothic_username = Request.Form(”cngothic_username”)

ASP文件里直接用Request来获取。SWF传递过来的值!

ASP & FLASH 对联数据示例

,

Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

1 Comment so far...

  1. cngothic

    填写汉字提交入库后显示为乱码。
    在获取names值的ASP页面加上
    < %@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    乱码依然存在。
    大P蚊发来两句AS不明意思号称解决乱码问题。哈哈
    System.useCodepage = true;
    mytext.html=true;

    希望大P蚊能早些把二百张图片处理完。

Leave a reply?