【问题标题】:submit button of form does not work表单的提交按钮不起作用
【发布时间】:2016-09-04 11:20:55
【问题描述】:

我的表单没有按应有的方式提交

我看到<form> 内部可能有一个<table>,所以这应该不是问题吧?

<from action="pages/save.php" method="post">
        <table class="table table-condensed">
            <tr>
                <td>Name:</td>
                <td>
                    <input name='name' class="form-control" type="text" value="<?php echo ucfirst($result['name']);?>" />
                </td>
            </tr>
            <tr>
                <td>Id:</td>
                <td>
                    <input name='id' class="form-control" disabled type="text" value="<?php echo ucfirst($result['id']);?>" />
                </td>
            </tr>
            <tr>
                <td>Product #:</td>
                <td>
                    <input name='productNumber' class="form-control" type="text" value="<?php echo ucfirst($result['productNumber']);?>" />
                </td>
            </tr>
            <tr>
                <td>Size:</td>
                <td>
                    <input name='size' class="form-control" type="text" value="<?php echo ucfirst($result['size']);?>" />
                </td>
            </tr>
            <tr>
                <td>Color:</td>
                <td>
                    <input name='color' class="form-control" type="text" value="<?php echo ucfirst($result['color']);?>" />
                </td>
            </tr>
            <tr
                <?php if($result['storage']<$result['storageWarningAmount']){echo "class='danger'";}?>>
                <td>Storage:</td>
                <td>
                    <input name='storage' class="form-control" disabled type="text" value="<?php echo ucfirst($result['storage']);?>" />
                </td>
            </tr>
            <tr>
                <td>Storage warning amount:</td>
                <td>
                    <input name='storageWarningAmount' class="form-control" type="text" value="<?php echo ucfirst($result['storageWarningAmount']);?>" />
                </td>
            </tr>
            <tr>
                <td>Image path:</td>
                <td>
                    <input name='imgPath' class="form-control" type="text" value="<?php echo $result['imgPath'];?>" />
                </td>
            </tr>
            <tr>
                <td>Date added:</td>
                <td>
                    <input name='dateAdded' class="form-control" disabled type="text" value="<?php echo ucfirst($result['dateAdded']);?>" />
                </td>
            </tr>
            <tr>
                <td>Date last updated:</td>
                <td>
                    <input name='dateLastUpdated' class="form-control" disabled type="text" value="<?php echo ucfirst($result['dateLastUpdated']);?>" />
                </td>
            </tr>
        </table>
        <input type="submit" class="btn btn-info" value="Save"/>
        <input type="hidden" name="token" value="<?php echo Token::generate()?>" />
    </from>

我什么都试过了。

我没有这个表单的js

$result 在页面顶部生成并且具有正确的值

pages/save.php 存在

【问题讨论】:

  • 它的形式,你写自

标签: html forms input submit


【解决方案1】:

您将&lt;form&gt; 拼错为&lt;from&gt;。这将被a validator 接收。

【讨论】:

    猜你喜欢
    • 2015-10-10
    • 2016-09-18
    • 2020-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-11
    相关资源
    最近更新 更多