Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.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+;php表单_Php_Html_Forms - Fatal编程技术网

Javascript+;php表单

Javascript+;php表单,php,html,forms,Php,Html,Forms,我正试图在我的网站上制作一个联系表单。 代码如下: <form id="form" method="post" action="send.php"> <fieldset> <label><input type="text" value="Email" onBlur="if(this.value=='') this.value='Email'" onFocus="if(th

我正试图在我的网站上制作一个联系表单。 代码如下:

        <form id="form" method="post" action="send.php">
                <fieldset>
                  <label><input type="text" value="Email" onBlur="if(this.value=='') this.value='Email'" onFocus="if(this.value =='Email' ) this.value=''"></label>
                  <label><input type="text" value="App URL" onBlur="if(this.value=='') this.value='App URL'" onFocus="if(this.value =='App URL' ) this.value=''"></label>                                             
                  <div class="btns"><a href="javascript:" class="button" onClick="document.getElementById('form').submit()">Send</a></div>
                </fieldset>  
        </form> 

问题是send.php页面在$\u POST!中没有任何内容

有人知道如何解决这个问题吗?
谢谢大家!

输入没有名称。只有具有名称的输入才能成为成功的控件(因此可以提交)


名称用于确定PHP生成的关联数组中的键。

您的输入标记需要一个
name
属性才能显示在
$\u POST
数组中

w3schools.com页面解释确切用法:

不要滥用
作为真实标签的替代品。它有严重的可访问性问题。不要用div替换按钮,这样做会造成可访问性噩梦。请看这个。如果你坚持的话