表单无法在Internet Explorer中使用 [英] Form not working in Internet Explorer

查看:103
本文介绍了表单无法在Internet Explorer中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此表单代码在Mozilla和Chrome中有效,但在Internet Explorer中不起作用.

This form code is working in Mozilla and Chrome, but in Internet Explorer it is not working.

<form method="post" action="logincheck.php" >
    <span class="meta">
        <table>
    </span>
    <tr>
        <td>
            <span class="meta">
                <label >Username </label>
            </span>
            <label>
        </td>
        <td> <input name="username" type="text" />
            </label>
</form>
        </td>
    </tr>
    <tr>
        <td> <label ><span class="meta">Password</td>
        <td>
            <input name="password" type="password" />
                     </span>
             </label>
        </td>
    </tr>
    <tr>
        <td>
            <span class="meta">
            </span>
            <label>
                <input type="submit" name="Submit" value="Submit"  class="submit"/>
            </label>
        </td>
    </tr>
    </table>
</form>

推荐答案

您有许多HTML错误,最重要的是在第一个<input>之后不久有一个额外的</form>标记.这意味着第二个inputsubmit按钮在表单之外,因此将不起作用. Firefox和Chrome在这里似乎更加宽容.

You have a number of HTML errors, most important being an extra </form> tag shortly after the first <input>. That means the second input and the submit button are outside the form, so it won't work. Firefox and Chrome are being a bit more forgiving here it seems.

修正您的HTML,表格应该可以正常工作.

Fix your HTML and the form should work fine.

这篇关于表单无法在Internet Explorer中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆