如何将HTML发送到服务器? [英] How do I get HTML sent to server?

查看:300
本文介绍了如何将HTML发送到服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,


我需要从客户端回到服务器的HTML来做服务器

处理。我想要HTML和表单数据。是否有一种简单的方法

来捕获它?我不想提交页面......我将使用ajax发送

数据。


我知道如何获取元素但不是整个页面或表格。我真的很有兴趣指定document.form2并发送它。


谢谢,

云母

Hey,

I have a need to get HTML from a client back to a server to do server
processing. I would like the HTML and form data both. Is there a simple way
to capture that? I do not want to submit the page...I will use ajax to send
the data.

I know how to get the elements but not the entire page or form. I am really
just interested in specifying document.form2 and sending that.

Thanks,
Mica

推荐答案

MCaécrit:
MC a écrit :

嘿,


我需要将HTML从客户端返回到服务器来进行服务器处理

。我想要HTML和表单数据。是否有一种简单的方法

来捕获它?我不想提交页面......我将使用ajax发送

数据。


我知道如何获取元素但不是整个页面或表格。我真的只想对指定document.form2并发送它感兴趣。
Hey,

I have a need to get HTML from a client back to a server to do server
processing. I would like the HTML and form data both. Is there a simple way
to capture that? I do not want to submit the page...I will use ajax to send
the data.

I know how to get the elements but not the entire page or form. I am really
just interested in specifying document.form2 and sending that.



我不明白为什么你需要html ...

最简单的方法是使用Ajax提交form2,然后回复,

填充字段(或替换form2的全部内容)。


-

sm

I do not understand why you need the html ...
Simplest being to submit the form2 using Ajax, then on response, to
populate the fields (or to replace the whole content of form2).

--
sm




" SAM" < st ********************* @ wanadoo.fr.invalidwrote in message

news:48 ******* ************** @ news.orange.fr ...

"SAM" <st*********************@wanadoo.fr.invalidwrote in message
news:48*********************@news.orange.fr...

MCaécrit:
MC a écrit :

>嘿,

我需要将HTML从客户端返回服务器进行服务器处理。我想要HTML和表单数据。是否有一种简单的方法来捕获它?我不想提交页面...我将使用ajax
发送数据。

我知道如何获取元素而不是整个页面或表单。我真的只是对指定document.form2并发送它感兴趣。
>Hey,

I have a need to get HTML from a client back to a server to do server
processing. I would like the HTML and form data both. Is there a simple
way to capture that? I do not want to submit the page...I will use ajax
to send the data.

I know how to get the elements but not the entire page or form. I am
really just interested in specifying document.form2 and sending that.



我不明白为什么你需要html ...

最简单的方法是使用Ajax提交form2,然后回复,

填充字段(或替换form2的全部内容)。


-

sm


I do not understand why you need the html ...
Simplest being to submit the form2 using Ajax, then on response, to
populate the fields (or to replace the whole content of form2).

--
sm



因为第三方服务器库需要它进行处理,因为它在客户端浏览器上看起来已经完成了


Because a 3rd party server library requires it for processing just as it
looks completed on the client browser.

On Sun,2008年6月15日17:57:11 -0300,MC<" mica [removethis]" @ aisus.com>

写道:
On Sun, 15 Jun 2008 17:57:11 -0300, MC <"mica[removethis]"@aisus.com>
wrote:

因为第三方服务器库需要它进行处理,因为它在客户端浏览器上看起来已经完成了

Because a 3rd party server library requires it for processing just as it
looks completed on the client browser.



奇怪。如果您希望将* exact * HTML发送回您的服务器,则

不应使用innerHTML (浏览器可以按照它想要的方式输出它),

而不是存储(在服务器端时间)必须发送的HTML副本

返回某处(隐藏)输入,JavaScript变量,[...])当你的表格发送

时,抓住那些内容。

-

Jonas Raoni Soares席尔瓦
http://jsfromhell.com


这篇关于如何将HTML发送到服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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