<select name="aa" οnchange="resetSelectWidth(this);">
<option value="111">111</option>
<option value="222">22222</option>
<option value="333">33333333</option>
<option value="444">44444444444</option>
<option value="555">555555555555555</option>
</select>
<script>
function resetSelectWidth(obj){
var tempObj=document.createElement("select");
tempObj.length=1;
tempObj.options[0].text=obj.options[obj.selectedIndex].text
obj.parentNode.appendChild(tempObj);
obj.style.width=tempObj.offsetWidth;
obj.parentNode.removeChild(tempObj);
}
</script>
<option value="111">111</option>
<option value="222">22222</option>
<option value="333">33333333</option>
<option value="444">44444444444</option>
<option value="555">555555555555555</option>
</select>
<script>
function resetSelectWidth(obj){
var tempObj=document.createElement("select");
tempObj.length=1;
tempObj.options[0].text=obj.options[obj.selectedIndex].text
obj.parentNode.appendChild(tempObj);
obj.style.width=tempObj.offsetWidth;
obj.parentNode.removeChild(tempObj);
}
</script>