表单的提交按钮在Internet Explorer中不起作用

时间:2016-02-20 11:02:53

标签: html forms

我的网站上有一个提交按钮不起作用的表单。这只发生在IE上。它适用于所有其他浏览器。你知道可能是什么问题吗?以下是用于表单的嵌入式HTML。感谢您提供任何帮助!

<html>
<head>
<style> 
    .textbox {
    background: #F1F1F1 url(http://html-generator.weebly.com/files/theme/input-text-40.png) no-repeat;
    background-position: 5px -7px !important;
    padding: 10px 10px 10px 21px;
    width: 150px;
    border: 1px solid #CCC;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    -moz-box-shadow: 0 1px 1px #ccc inset, 0 1px 0 #fff;
    -webkit-box-shadow: 0 1px 1px #CCC inset, 0 1px 0 #FFF;
    box-shadow: 0 1px 1px #CCC inset, 0 1px 0 #FFF;
    color:#666;
}

::-webkit-input-placeholder { /* WebKit browsers */
    color:    #CCC;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
   color:    #CCC;
   opacity:  1;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
   color:    #CCC;
   opacity:  1;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
   color:    #CCC;s
}

.textbox:focus {
    background-color: #FFF;
    border-color: #E8C291;
    outline: none;
    -moz-box-shadow: 0 0 0 1px #e8c291 inset;
    -webkit-box-shadow: 0 0 0 1px #E8C291 inset;
    box-shadow: 0 0 0 1px #E8C291 inset;
}


.myButton {
    -moz-box-shadow:inset 0px 0px 0px 0px #cf866c;
    -webkit-box-shadow:inset 0px 0px 0px 0px #cf866c;
    box-shadow:inset 0px 0px 0px 0px #cf866c;
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #d0451b), color-stop(1, #781400));
    background:-moz-linear-gradient(top, #d0451b 5%, #781400 100%);
    background:-webkit-linear-gradient(top, #d0451b 5%, #781400 100%);
    background:-o-linear-gradient(top, #d0451b 5%, #781400 100%);
    background:-ms-linear-gradient(top, #d0451b 5%, #781400 100%);
    background:linear-gradient(to bottom, #d0451b 5%, #781400 100%);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d0451b', endColorstr='#781400',GradientType=0);
    background-color:#d0451b;
    display:inline-block;
    cursor:pointer;
    color:#ffffff;
    font-family:Verdana;
    font-size:14px;
    padding:8px 12px;
    text-decoration:none;
    text-shadow:0px 0px 0px #854629;
}
.myButton:hover {
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #781400), color-stop(1, #d0451b));
    background:-moz-linear-gradient(top, #781400 5%, #d0451b 100%);
    background:-webkit-linear-gradient(top, #781400 5%, #d0451b 100%);
    background:-o-linear-gradient(top, #781400 5%, #d0451b 100%);
    background:-ms-linear-gradient(top, #781400 5%, #d0451b 100%);
    background:linear-gradient(to bottom, #781400 5%, #d0451b 100%);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#781400', endColorstr='#d0451b',GradientType=0);
    background-color:#781400;
}
.myButton:active {
    position:relative;
    top:1px;
}


</style>     

<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<form id="Logon" name="Logon" action=" https://secure1.ufsdata.com/PBI_PBI1961/pbi1961.ashx?WCI=RemoteLogin&RT=075902308&LogonBy=Connect3" method="post" target onsubmit="return subcount();" autocomplete="off">

<input class="textbox"type="text" id="AccessID" name="AccessID" placeholder="Online Banking ID"> 

<button class="myButton">Submit</button>
</form>
<br><br>
<br><br> 
</body>
</html>

2 个答案:

答案 0 :(得分:0)

您需要使用Javascript&#39; onclick事件。

答案 1 :(得分:0)

将按钮更改为:

<button type="submit" class="myButton">Submit</button>