使用JavaScript/JQuery创建和写入文件 [英] Create and Write to Files with JavaScript/JQuery

查看:90
本文介绍了使用JavaScript/JQuery创建和写入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前,我开始在c#中建立一个与我们交谈页面".

A few days ago I started to build a "Talk To Us Page" In c#.

所以,我做了几个按钮和文本菜单选项.

So, I did a few buttons and text arena options..

这很容易,就像C#一样.您只需使用系统IO或任何东西,然后写入文件即可.

And it was easy as C# should be. You just use a system IO or any thing and write to files..

我试图用JS \ jQuery非常类似地做某事,却不知道该怎么做.

I tried to do some thing very similarly with JS\jQuery and had no idea how to do so.

我环顾了一下Google,却一无所获.确实,发现大约30个人在说真正不起作用的内容.

I looked around google a bit, and found nothing. Really, found about 30 people who are saying things that are really not working.

我要做的是从文本框中写几行文本.

And I have to do is write a few lines of text from textbox..

文本框如下所示:

<input type="text" name="">

<input type="text" name="">

,当您单击一个按钮时,它将全部写入驱动程序c或类似文件中的文件.

and when you clicked of a button it will write it all down to a file in driver c, or anything like that.

我真的认为这并不难,但是我需要帮助.

I really thinks its not that hard, but I need a hand.

请帮助我.谢谢!

推荐答案

,当您单击按钮时,它将全部写入驱动程序c或类似文件中的文件.

and when you clicked of a button it will write it all down to a file in driver c, or anything like that.

忘记它.出于安全原因,在浏览器中运行的javascript不能访问客户端和服务器文件.如果可能的话,请考虑一下后果.您访问Internet上的某个站点后,突然文件突然开始弹出,并且从硬盘驱动器中消失了.绝对应该禁止的事情.

Forget about it. For security reasons javascript that runs in a browser has no access to client and server files. Just think of the consequences if this was possible. You visit some site on the internet and all of a sudden files start to popup up and out of existence from your hard drive. Definitely something that should be forbidden.

这篇关于使用JavaScript/JQuery创建和写入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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