English 中文(简体)
2. 卸载与实验室的相片,而不重载
原标题:Upload photos with php without reload

www.un.org/Depts/DGACM/index_spanish.htm 我想要的是。

我不想上下页,而是要把图像的源头连接到文字区。

因此,当我推介<代码>upload_photo时,图像上载和link就添加到textarea上。

我想纯超文本、Javascript AJAX和PHP。


www.un.org/Depts/DGACM/index_spanish.htm 我的


<form action"index.php" method="post" enctype="multipart/form-data">
    <textarea id="textarea" name="text"></textarea>
        <input type="file" name="photo" />
        <input type="submit" name="upload_photo"/>
    <input type="submit" name="post"/>
</form>

www.un.org/Depts/DGACM/index_spanish.htm 例:


http://www.bianfeed.com - 当你上载档案时,该网页不会重载。

www.un.org/Depts/DGACM/index_spanish.htm 我不想什么?


请避免用j Query或 任何图书馆、APICA。

最佳回答

That s easy. Put an iframe, give it a name, for example "MyIframe". Then in the form, add the TARGET attribute, with the value "MyIframe", and the action - the script that takes the upload (takeupload.php for example) In the main page define a Javascript function that does something you need after the upload is done, which will be called, with parameters, from the page generated by takeupload.php.

载荷。 php上载图像,然后作为输出发送一个正常的空白的超文本页面,该页面将使用上面描述的方法,并需要一套参数(姓名、途径、错误或光彩,以插入某些地方等)。

如此:

<script type="text/javascript">
parent.YourJSMethod(parameters);
</script>

该网页将装上机面,并运行在机面外确定的功能。 有效载荷已经完成,上级网页收到有关结果的数据。

这相当简单。 不需要 j,没有美国宇宙航空研究开发机构,没有东西,只是简明的 Java印法和很少的超文本。

问题回答

∗∗∗∗∗ 我不会再说一遍,“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“A”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......”、“......””””。 页: 1

http://www.webtoolkit.info/ajax-file-upload.html





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签