зеркало из https://github.com/mozilla/pjs.git
20 строки
364 B
HTML
20 строки
364 B
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<body>
|
||
|
<form name="theForm">
|
||
|
<select name="theSelect" style="width: auto">
|
||
|
<option>xxxxxxxxxx</option>
|
||
|
</select>
|
||
|
</form>
|
||
|
<script>
|
||
|
// Flush reflow
|
||
|
document.body.offsetWidth;
|
||
|
document.theForm.theSelect.style.width='2em';
|
||
|
document.body.offsetWidth;
|
||
|
document.theForm.theSelect.style.width='auto';
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|