Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/278.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/3/html/87.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 Bootstrap form won';t使用图像按钮提交_Php_Html_Forms_Twitter Bootstrap_Submit - Fatal编程技术网

Php Bootstrap form won';t使用图像按钮提交

Php Bootstrap form won';t使用图像按钮提交,php,html,forms,twitter-bootstrap,submit,Php,Html,Forms,Twitter Bootstrap,Submit,我用Bootstrap制作了一个表单。有一个图像按钮来提交表单,但当我点击它时,什么也没有发生 <form name="input" action="index.php" method="post" class="form-horizontal"> <div class="input-group"> <span class="input-group-addon">@</span>

我用Bootstrap制作了一个表单。有一个图像按钮来提交表单,但当我点击它时,什么也没有发生

<form name="input" action="index.php" method="post" class="form-horizontal">                    
    <div class="input-group">
        <span class="input-group-addon">@</span>
        <input name="coins" type="text" class="form-control" placeholder="Quanity" >
    </div><br>
    <div class="input-group">
        <span class="input-group-addon">@</span>
        <input type="text" class="form-control" name="usd" placeholder="USD" >
    </div><br>
    <div class="input-group">
        <span class="input-group-addon">@</span>
        <input  type="text" class="form-control" name="paypal" placeholder="PayPal Address" >
    </div><br>
    <div class="input-group">
        <input type="image" src="/img/ppbutton.png" name="submit" alt="PayPal - The safer, easier way to pay online!">
    </div><br>
</form> 

@

@
@


您的提交按钮需要是一个按钮/submit,并使用CSS设置样式:

<style>
div.submitter input {
    /*you will need to adjust your stylesheet so it looks the way you want.*/
    width: 100px;
    height: 40px;
    background-image: url(/img/ppbutton.png);
    background-repeat: no-repeat;
    border: 1px solid;
    }
</style>

<!-- REPLACE IN YOUR FORM -->
<div class="submitter"><input type="submit" name="submit" alt="PayPal - The safer, easier way to pay online!" /></div>

分区提交器输入{
/*您需要调整样式表,使其看起来符合您的需要*/
宽度:100px;
高度:40px;
背景图片:url(/img/ppbutton.png);
背景重复:无重复;
边框:1px实心;
}

尝试添加this.form.submit,如下所示:

<input type="image" onclick="this.form.submit()" src="/img/ppbutton.png" name="submit" alt="PayPal - The safer, easier way to pay online!">

它提交表单,但以图像的x和y坐标的形式发送值

例如:

<input type="submit" name="submit" alt="PayPal - The safer, easier way to pay online!" />

这使得按钮位于图像顶部,按钮也无法提交。
<button class="btn btn-default" type="submit" name="delete" value="delete">
     <img src="/delete.png" width="20" />
</button>