本文介绍了Indy可以运行Javascript吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一款名为AnyChart的软件产品非常适合在网页中嵌入基于Flashed的图表。 AnyCharts也可以导出为PNG文件格式。以下是一个示例:

There is a software product called AnyChart which is great for embedding Flashed based charts in web pages. AnyCharts can also export to PNG file format. Here is an example:

<script type="text/javascript" language="javascript">
    //<![CDATA[
    var chart = new AnyChart('http://www.mysite.com/swf/AnyChart.swf');
    chart.width = 600;
    chart.height = 300;
    chart.setXMLFile('http://www.mysite.com/anychart.xml');
    chart.addEventListener("draw", function() { saveChartAsImage(chart); });
    chart.write("content-box");
    //]]>
</script>

我的最终目标是制作一个自动服务,将AnyChart图表导出为PNG格式。所以我用Indy做了一个服务,调用包含AnyChart javascript的页面。但问题似乎是Indy无法执行javascript。

My ultimate goal is to make a automated service to export the AnyChart charts to PNG format. So I made a service with Indy which calls pages containing the AnyChart javascript. But the problem seems to be that Indy cannot execute the javascript.

有没有办法让Indy执行javascript?

Is there a way to enable Indy to execute javascript?

推荐答案

不,Indy不执行Javascript。您可能还注意到它没有解析或显示HTML,也没有运行Flash。 Indy执行网络协议。

No, Indy does not execute Javascript. You may have also noticed that it doesn't parse or display HTML, and it doesn't run Flash, either. Indy does network protocols.

您可以导入Microsoft Script Control ActiveX对象并让 运行您的Javascript。如果您需要详细信息,请发布一个新问题。

You could import the Microsoft Script Control ActiveX object and have that run your Javascript. If you need details on that, post a new question.

这篇关于Indy可以运行Javascript吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 18:30