简体   繁体   English

从flex调用JavaScript

[英]Calling javascript from flex

I am using ExtrernalInterface.call(javascript_function, args); 我正在使用ExtrernalInterface.call(javascript_function, args); to call javascript functions from Flex. 从Flex调用javascript函数。 But this fails in case of browsers that have javascript disabled. 但这在禁用了javascript的浏览器的情况下失败。

Is there any other way to call javascript functions from flex? 还有其他方法可以从flex调用javascript函数吗?

If JavaScript is disabled in the browser then there is no way to invoke it from Flex. 如果在浏览器中禁用了JavaScript,则无法从Flex调用它。 In fact, if you were to find a way it would be a security hole. 实际上,如果您找到一种方法,那将是一个安全漏洞。

Prior to AS3, fscommand was used to call javascript functions from flash. 在AS3之前, fscommand用于从Flash调用javascript函数。 But no matter what method you use to call javascript, it won't work if the user has disabled javascript in the browser. 但是,无论您使用哪种方法调用javascript,如果用户在浏览器中禁用了javascript, 它都将无法工作 Because javascript has been disabled in that browser to begin with. 因为一开始该浏览器已禁用了javascript。

Unfortunately, no. 抱歉不行。 ExternalInterface is the only way to communicate with JavaScript. ExternalInterface是与JavaScript通信的唯一方法。

What do you mean, in browse, javascript are disable 您的意思是, in browse, javascript are disable

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM