close

 

Html

於 ~\html-template\index.template.html 內將 js import 或 撰寫 javascript

     <script type="text/javascript" src="js/map.js"></script>
    Or

     <script type="text/javascript">
         alert('Test');
     </script>
若是 import js 則須將 js 檔置於 ~\html-template\ 目錄下
可建立一資料夾放置 js 如 ~\html-template\js\
Flex
於 mxml 的 Script 區段或 as 檔中呼叫 js 中的 function
假設 js function 名稱為 TestFunction
第一個逗號後方依序為帶入參數1、參數2 此例為x、y

     ExternalInterface.call("TestFunction", x, y);

 

arrow
arrow
    全站熱搜

    流風羽 發表在 痞客邦 留言(0) 人氣()