如何控制控件的前后位置关系?

 1<html><head>
 2<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
 3<script>   
 4function get_posi()   
 5{   
 6id_test.value = id_ComboBoxID.offsetLeft;   
 7id_test.value = id_ComboBoxID.offsetHeight;   
 8//id_test.style = "POSITION: absolute"   
 9id_test.style.posLeft = id_ComboBoxID.offsetLeft;   
10id_test.style.posHeight = id_ComboBoxID.offsetHeight;   
11id_test.style.posWidth = id_ComboBoxID.offsetWidth + 10;   
12id_test.style.posHeight = id_ComboBoxID.offsetHeight;   
13//id_test.style.posLeft = 10;   
14id_test.selectedIndex = 1;   
15id_test.select()   
16}   
17</script>
18<meta content="MSHTML 6.00.2600.0" name="GENERATOR"/></head>
19<body onresize="get_posi()">
20<p>请输入:   
21  
22<select id="id_ComboBoxID" onchange="" onresize="alert('test')" style="">
23<option selected="" value="1">1</option>
24<option value="2">2</option>
25<option value="3">3</option>
26</select> <input id="id_test" name="mtest" style="POSITION: absolute" type="text"/>
27<br/>
28<br/><br/><br/>
29</p>
30</body></html>

我想让文本框在列表框的前面显示,请问如何才能实现?
---------------------------------------------------------------

 1<div style="z-index:100">   
 2\---------------------------------------------------------------   
 3  
 4<input id="id_test" name="mtest" style="POSITION: absolute" type="text"/>
 5<p>请输入:   
 6  
 7<select id="id_ComboBoxID" onchange="" onresize="alert('test')" style="">
 8<option selected="" value="1">1</option>
 9<option value="2">2</option>
10<option value="3">3</option>
11</select></p></div>
Published At
Categories with Web编程
comments powered by Disqus