我想将输入框的背景从白色更改为另一种颜色,然后以缓慢褪色的方式再次变回白色。我已经尝试过动画它根本不起作用。没有错误。
<script type="text/javascript" src="/jsp/ui/jquery-ui/js/jquery-1.8.3.min.js"></script>
...
$(document.getElementById(id)).animate({ backgroundColor: "#4E1402" }, 500);
更新
这工作正常
$(document.getElementById(id)).animate({ width: "400px" }, 500);