gpt4 book ai didi

javascript - 按钮输入上的 CSS 取消 jQuery 中的 prop disabled 属性

转载 作者:太空宇宙 更新时间:2023-11-04 10:46:59 25 4
gpt4 key购买 nike

我为输入按钮制作了一些 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com