Сообщение от wwonder
|
Как в js можно сделать hide конкретного option?
|
Как вариант...
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<script src='http://code.jquery.com/jquery-latest.js'></script>
<!--
<script src='http://code.jquery.com/jquery-latest.js'></script>
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
-->
<style type='text/css'>
</style>
<script type='text/javascript'>
$(function(){
$('select').eq(0).change(function(){
var o=$(this).next().find('option');
o.show().eq(this.selectedIndex).hide();
});
});
</script>
</head>
<body>
<select>
<option></option>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<select>
<option></option>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
</body>
</html>