Flex与Javascript互相通信
Flex与Javascript互相通信。
在Flex中有这么一个类:ExternalInterface.在这个类中它给我们:call和addCallback
Flex中As调用Js的方法是:
1、导入包 (import flash.external.ExternalInterface;)
2、使用ExternalInterface.call("Js函数名称",参数)进行调用,其返回的值就是Js函数所返回的值
Js调用As的方法是:
1、导入包 (import flash.external.ExternalInterface;)
2、在initApp中使用ExternalInterface.addCallback("用于Js调用的函数名",As中的函数名)进行注册下
3、js中 就可以用document.getElementById("Flas在Html中的ID").注册时设置的函数名(参数)进行调用.
相关文档:
tofino http://www.ensemble.com/products/tofino.html
Ensemble Tofino for Visual Studio is a plugin that enables .NET
developers to create Flex front ends for their applications in the same
IDE that they normally use. Instead of using a separate text or XML
editor and manually invoking the c ......
CSS语法 (不区分大小写) JavaScript语法 (区分大小写)
border border
border-bottom borderBottom
border-bottom-color borderBottomColor
border-bottom-style borderBottomStyle
border-bottom-width borderBottomWidth
border-color borderColor
border-left borderLeft ......
replace
方法
以下是javascript
中的例子
下面的示例演示了 replace
方法将第一次出现的单词 "The"
替换为单词 "A"
的用法。
function ReplaceDemo(){
var r, re; & ......
引自:http://www.cnblogs.com/dongritengfei/archive/2009/12/21/1628489.html
今天弄了一天的Ajax中文乱码问题,Ajax的乱码问题分为两种:
1. JavaScript输出的中文乱码,
比如:alert("中文乱码测试");
解决的办法比较简单,就是把jsp里所有的charset和pageEncoding的值都设置成相同的,一般是utf-8.
  ......