我为输入按钮制作了一些 CSS 样式。这样做之后,prop('disabled',true)
对我不起作用(它曾经在 CSS 更改之前起作用)
HTML代码:
<div id="navigation">
<button id="nextButton" type="button" name="nextButton">Next</button>
</div>
jQuery 代码:
$('#nextButton').prop('disabled',true);
CSS 代码:
button{
background: #cfe2f3;
background: -webkit-linear-gradient(#cfe2f3, #d0e0e3);
background: linear-gradient(#cfe2f3, #d0e0e3);
border: 0.5px solid #000;
border-radius: 5px;
color: #000;
display: inline-block;
padding: 8px 20px;
font: normal 700 18px/1 "Calibri", sans-serif;
text-align: center;
text-shadow: none;
}
我建议它禁止按下“下一步”按钮
最佳答案
尝试为禁用状态添加一些 CSS:
button:disabled {
// your css rules
}
关于javascript - 按钮输入上的 CSS 取消 jQuery 中的 prop disabled 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35310803/