Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/281.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.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
Php 如何设置diago中显示的表单操作结果?_Php_Jquery - Fatal编程技术网

Php 如何设置diago中显示的表单操作结果?

Php 如何设置diago中显示的表单操作结果?,php,jquery,Php,Jquery,假设我在index.php中有这样的表单: <form method="get" name="s" action="search.php" id="s"> <input type="text" name="email" size="25" /> <input type="submit" name="ss" value="search" id="ss"/> </form> 我相信我的代码是在这里编写的,但似乎我没有输出,为什么?非常感谢,但是

假设我在
index.php
中有这样的表单:

<form  method="get" name="s" action="search.php" id="s"> 
<input type="text"  name="email" size="25" />
<input type="submit" name="ss" value="search" id="ss"/>
</form>

我相信我的代码是在这里编写的,但似乎我没有输出,为什么?

非常感谢,但是你能帮我再次将结果显示在jquery的对话框中吗?你是说一个模式窗口?如果是,则搜索如何在jquery中创建模式窗口,或者使用jquery插件来创建模式窗口。
$("#s").on("submit",function(e){
e.preventDefault();
$.get("search.php",$(this).serialize(),function(data){
alert(data);//or do whatever you want!
});
});
$("#s").on("submit",function(e){
e.preventDefault();
$.get("search.php",$(this).serialize(),function(data){
alert(data);//or do whatever you want!
});
});