진정 으로 select 드 롭 다운 을 실현 하고 readonly 만 읽 습 니 다.

1394 단어 readOnly
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>


<SCRIPT LANGUAGE="JavaScript">

 $(document).ready(function(){ 
	var index=$("#countries").attr('selectedIndex')
	$("#countries").change(function() {
		this.selectedIndex=index;
	 });
});

</SCRIPT>


<select id="countries" > 
	<option value="1">Country1</option> 
	<option value="2">Country2</option> 
	<option value="3">Country3</option> 
	<option value="4">Country4</option> 
	<option value="5">Country5</option> 
	<option value="6">Country6</option> 
	<option value="7">Country7</option> 
	<option value="8">Country8</option> 
	<option value="9">Country9</option>
</select>


 
 원리:
<select  onchange="this.selectedIndex=1">  
<option>1 </option>  
<option  selected>2 </option>  
<option>3 </option>  
</select>

좋은 웹페이지 즐겨찾기