Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.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
Html IE 10中的输入字段无法通过ip地址识别required和placeholder属性,但可以通过localhost识别_Html_Forms_Internet Explorer 10 - Fatal编程技术网

Html IE 10中的输入字段无法通过ip地址识别required和placeholder属性,但可以通过localhost识别

Html IE 10中的输入字段无法通过ip地址识别required和placeholder属性,但可以通过localhost识别,html,forms,internet-explorer-10,Html,Forms,Internet Explorer 10,这是我的表格: <form action="Validation2" method="post"> <p><label for="username">Username: </label> <input class="username" name="username" placeholder="username" required/></p> <p><label

这是我的表格:

<form action="Validation2" method="post">
        <p><label for="username">Username: </label>
        <input class="username" name="username" placeholder="username" required/></p>
        <p><label for="password">Password: </label>
        <input class="password" type="password" name="password" placeholder="********" required/></p>
        <p><input type="submit" value="send"></p>

    </form>

用户名:

密码:

以及我的Doctype:

<!DOCTYPE html>

如果我在localhost下访问网站,它可以正常工作,但是如果在IP地址下访问网站,则没有占位符,并且必需的属性不起作用


有人有主意吗?

谢谢大家。我用这条线解决了这个问题

<meta http-equiv="X-UA-Compatible" content="IE=edge" />


检查您的手机是否具有兼容模式IP@Fabio,兼容模式(怪癖模式)可能取决于IP,但不会导致类似的问题。很可能web服务器发送的文档内容有所不同。您需要显示导致此问题的完整HTML文档(最好是最小的)的实际示例。可以将IE设置为例如IE 9仿真模式,其中许多HTML5新功能被禁用,但这需要用户操作,并且不依赖于本地和服务器访问。