Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/263.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在使用javascript提交表单之前,在iframe中获取表单的数据_Javascript_Php_Jquery_Html_Iframe - Fatal编程技术网

在使用javascript提交表单之前,在iframe中获取表单的数据

在使用javascript提交表单之前,在iframe中获取表单的数据,javascript,php,jquery,html,iframe,Javascript,Php,Jquery,Html,Iframe,大家好,我有一件复杂的工作要做。让我们试着解释一下: 我有一个基本的web表单,加载到我的web中的iframe中: <form > First name: <input type="text" name="first_name" /><br> Last name: <input type="text" name="last_name" /> <input type="submit" name="submit" value="Submit"

大家好,我有一件复杂的工作要做。让我们试着解释一下:

我有一个基本的web表单,加载到我的web中的iframe中:

<form >
First name: <input type="text" name="first_name" /><br>
Last name: <input type="text" name="last_name" />
<input type="submit" name="submit" value="Submit" />
</form>

名字:
姓氏:
在他们提交数据之前,我需要“扫描”数据,然后将其作为post或get发送到php文件,这样我就可以从那里读取数据。我需要一些javascript代码来实现这一点

这可能吗?谢谢你的帮助:)

这个应该能解决你的问题。这个应该能解决你的问题。