使用jQuery的背景顏色,更改自定義組合輸入選擇框
我怎樣才能改變我的輸入框和選擇框兩者的背景下,當用戶無論是在降點擊關閉或把他們的光標輸入框?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
#refdocs_select {
left: expression(this.previousSibling.offsetLeft);
width: expression(this.previousSibling.offsetWidth);
clip: expression("rect(2px auto 20px " + (this.previousSibling.offsetWidth - 20) + "px)");
overflow: hidden;
position: absolute;
top: -1px;
font-size: 9pt;
font-family: Arial;
}
#refdocs_wrapper {
border: 1px solid rgb(128,128,128);
display: block;
position: relative;
width: 179px;
height: 20px;
}
#refdocs_input {
border: 0;
height: auto;
width: 174px;
position: relative;
font-size: 9pt;
font-family: Arial;
padding: 2px;
}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<div id="refdocs_wrapper">
<input id="refdocs_input" type="text" ><select id="refdocs_select"></select>
</div>
</body>
</html>