繼續(xù)關(guān)注我的C語言學(xué)習(xí)博客

          林臨的地盤

          java學(xué)習(xí)博客
          posts - 44, comments - 28, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          flash與jsp的交互

          Posted on 2007-03-28 09:08 lubaolin 閱讀(2876) 評論(2)  編輯  收藏 所屬分類: java
          1)swf從jsp讀數(shù)據(jù)
          a) 在flash中建一個動態(tài)文本框,一個button;文本框名字叫str,button上寫


          on (release) {
          loadVariable("http://localhost:8080/demo/sentVar.jsp", "","get");
          }//url相對,絕對路徑好像都可以


          b) 在sentVar.jsp中寫如下代碼:
          <%@ page contentType="text/html;charset=gb2312"%>
          <%
          String tmp="wowowo";
          out.println("&str="+tmp);//這里一定要寫成"&str="的形式,&一定不能少,str的名字要與你a中建的相同,“= ”號也不能少;
          %>
          c)測試。click button ...yeah~(failed?its none of my business) try again~~

          -------------------------------------------------------------------

          2)swf向jsp寫數(shù)據(jù)
          這個簡單點。

          c建一input textfield,起個名字str吧。一個button,上面寫:
          on (release) {
          getURL("showrs.jsp", "","get");
          }


          b)showrs.jsp中寫:

          <%@ page contentType="text/html;charset=gb2312"%>
          <%
          String tem=request.getParameter("str");
          out.println("str="+tem);
          %>

          everything is ok~enjoy...

          引自:http://www.flashempire.net/showpost.php?p=892409

          評論

          # re: flash與jsp的交互  回復(fù)  更多評論   

          2008-07-06 18:27 by JohnRowen

          # re: flash與jsp的交互  回復(fù)  更多評論   

          2008-08-26 14:54 by 路過
          loadVariable->loadVariables
          繼續(xù)關(guān)注我的C語言學(xué)習(xí)博客
          主站蜘蛛池模板: 凌云县| 华容县| 抚顺县| 乾安县| 库伦旗| 蕲春县| 当雄县| 唐山市| 南安市| 永新县| 汝南县| 武隆县| 都匀市| 永善县| 施秉县| 剑河县| 孟津县| 洛阳市| 锡林郭勒盟| 岳池县| 通山县| 渑池县| 鄂托克前旗| 利辛县| 肃宁县| 昌都县| 齐齐哈尔市| 晋州市| 凤冈县| 文登市| 柯坪县| 安溪县| 铜梁县| 宜川县| 呼伦贝尔市| 淮南市| 南澳县| 同江市| 许昌县| 麻城市| 慈利县|