我试过了
input[type="button"][disabled="disabled"]{
color:gray !important;
}这个CSS在我的代码,它的工作在IE,但不是在火狐。
这个css不适用于火狐..??
我的HTML代码
<input type="button" id="submit" value="Submit"></input>
<script location="body">
document.getElementById("submit").disabled=true;
</script>请帮帮我..。
发布于 2014-01-21 13:25:42
一些代码片段:将帮助您理解您所做的遗漏。
<html>
<head>
<style type="text/css">
input[type="button"][disabled="disabled"]{
color:gray !important;
}
</style>
<script type="text/javascript">
function myFunc() {
document.getElementById("myButton").disabled = true;
}
</script>
</head>
<body onload="myFunc()">
<input id="myButton" type="button" value="Hello"/>
</body>
</html>发布于 2014-01-21 13:23:30
https://stackoverflow.com/questions/21259319
复制相似问题