Java小应用程序可以打开一个"选择目录"和写入通过JavaScript交互的系统中呢? [英] Can a Java applet open a "select directory" and write to a filesystem via JavaScript interaction?

查看:154
本文介绍了Java小应用程序可以打开一个"选择目录"和写入通过JavaScript交互的系统中呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一种方式来保存一对夫妇用JavaScript客户端计算机上创建的文件。我希望他能够选择一个文件夹(类似于打开/保存对话框的文件夹),然后还有写文件。这显然​​需要三样东西:

I am looking for a way to save a couple of files created with JavaScript on the clients computer. I want him to be able to choose a folder (similar to open/save folder dialog), and then write the files there. This obviously requires three things:


  • 能够弹出这样的对话框。

  • 能够在客户端计算机上写(签名applet?)

  • 某种方式使用JavaScript交互,因为它知道文件名和内容来写。

这是可能的,或者我应该只停留在做梦吗?

Is this possible or should I just stop dreaming?

推荐答案

这肯定是可能的。

一种方法是使用签名的applet,但如果你的用户愿意升级到Java 1.6.0_10 +,不需要签名Applet。由于1.6.0_10(下一代Java插件),JNLP API服务可嵌入小程序。这里是一个演示。的JNLP文件服务

One way is to use a signed applet, but if your users are willing to upgrade to Java 1.6.0_10+, a signed applet is not needed. Since 1.6.0_10 (the Next Generation Java Plug-In), JNLP API services are available to embedded applets. Here is a demo. of the JNLP file services.

我看到其他的答复已经覆盖了小程序/ JS互动。

I see the other reply has already covered the applet/JS interaction.

这篇关于Java小应用程序可以打开一个"选择目录"和写入通过JavaScript交互的系统中呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆