Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.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 在IE8中提交输入不可单击_Html_Css_Internet Explorer 8 - Fatal编程技术网

Html 在IE8中提交输入不可单击

Html 在IE8中提交输入不可单击,html,css,internet-explorer-8,Html,Css,Internet Explorer 8,我有一个表单,其提交输入按钮有一个背景图像,并左移到输入字段的顶部: 这适用于所有当前浏览器。我的问题是,它还需要在IE8中在WindowsXP(!)上工作,但事实并非如此。当您将鼠标悬停在输入(放大镜)上时,指针不会改变,并且按钮不可单击。你知道我哪里做错了吗 HTML: 如果在HTML表单中使用按钮元素,不同的浏览器将提交不同的值。Internet Explorer将提交和标记之间的文本,而其他浏览器将提交值属性的内容。使用input元素在HTML表单中创建按钮 因此,这在您所说的web浏

我有一个表单,其提交输入按钮有一个背景图像,并左移到输入字段的顶部:

这适用于所有当前浏览器。我的问题是,它还需要在IE8中在WindowsXP(!)上工作,但事实并非如此。当您将鼠标悬停在输入(放大镜)上时,指针不会改变,并且按钮不可单击。你知道我哪里做错了吗

HTML:

如果在HTML表单中使用按钮元素,不同的浏览器将提交不同的值。Internet Explorer将提交和标记之间的文本,而其他浏览器将提交值属性的内容。使用input元素在HTML表单中创建按钮

因此,这在您所说的web浏览器(IE+XP)中不起作用,因为该浏览器不支持它。代码中没有问题。所以我想说,就这样吧,因为在XP上运行InternetExplorer的网站用户不会很多,但是如果有很多,那么你可能想在里面放一些文本

来源: 第页和来源上的第一个答案

这是一个开始:(演示:)

我删除了你的浮动并添加了一个div作为“边框包装器”。我认为这将使IE8发挥:)虽然我不能自己测试它,因为我没有IE8

<form id="" action="" method="post">
    <div id="searchwrap">    
        <label for="search">Search</label>
        <input type="text" id="search" name="search" value="" />
        <input type="submit" name="searchsub" class="searchsub" value="" />
    </div>
</form>

我没有使用按钮元素。@如果你没有,为什么不尝试使用一次呢。。。你说?很抱歉,我不是一个高级html程序员,很好用,谢谢!我只需添加
input:focus{outline width:0;}
即可删除Chrome中的轮廓。再次感谢。
#search {
width:222px;
height:36px;
padding-left:223px;
padding-right:10px;
float:left;
}

input.searchsub {
width:23px;
height:23px;
float:left;
background-image:url(../images/magnifier.jpg);
margin:8px 0 0 -32px;
border:0;
cursor:pointer;
}
<form id="" action="" method="post">
    <div id="searchwrap">    
        <label for="search">Search</label>
        <input type="text" id="search" name="search" value="" />
        <input type="submit" name="searchsub" class="searchsub" value="" />
    </div>
</form>
#searchwrap {
    display: inline-block;
    border: 1px solid #333;
    padding: 0 10px;
}
#search {
    width:150px;
    height:36px;
    border:0;
}

input.searchsub {
    width:23px;
    height:23px;
    background:red url();   // added red as i dont have your image
    margin:8px 0 0 0px;
    cursor:pointer;
}