select下拉框,设置不被选择方式

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>

<body>
<select>
<option value="">1</option>
<option value="">2</option>
<optgroup label="3"></optgroup>
<optgroup label="4"></optgroup>
<optgroup label="5"></optgroup>
</select>
</body>
</html>

时间: 2024-08-25 09:15:08

select下拉框,设置不被选择方式的相关文章

禁止select下拉框的其中某个选择项不能被选择

<select name='Grade' class='s8'> <option value=''>— 请选择 —</option>? <optgroup label='学期教育'></optgroup><option value='18'>  学期教育</option> <optgroup label='小学'></optgroup><option value='5'>  1年级<

jQuery select下拉框设置选中项

$("#selectId option:last").prop("selected", 'selected'); $("#selectId option").eq(0).attr("selected", true);

jquery选中将select下拉框中一项后赋值给text文本框

jquery选中将select下拉框中一项后赋值给text文本框,出现无法将第一个下拉框的value赋值给文本框 因为select默认选中第一项..在选择第一项时,便导致无法激发onchange事件.所以无法进行赋值给文本框 解决方法. select下拉框设置第一项做一个无用的占位option <script type="text/javascript">     function changeSelect(obj) {         var _this = obj;  

自定义样式的select下拉框深入探索

第一个版本: 首先实现自定义select下拉框应该具有的功能,我是选择将原来的select隐藏掉,自己在jquery代码中动态写进去<dl><dd><dt>这样的结构来模拟真正的select的操作. 用来模拟select框的div结构如下: <div class="selectbox">//包裹整个模拟框的盒子 <div class="currentselected"></div>//用于当前默

jQuery插件实现select下拉框左右选择_交换内容(multiselect2side)

效果图: 使用jQuery插件---multiselect2side做法: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head&

bootstrap select 下拉框没选择

情况:根据取得的值去选定select下拉框的选项.但不知为何每次根据select的id传递值过去了,也能取得对应的值,但是页面上的select依然是下拉框第一个选项,但点击下拉框时,会在对应的值有特殊css(选中标志),即改变了值,却没改变现实的值.原因:设置select的选中的option,并没有修改对应的span的值跟title.<span class="select2-selection__rendered" id="select2-字段ID-container&

vue的select 下拉框某一项设置为不可选

select下拉框中某一项不可选置灰 一, html <div class="sale"> <select @change="GetCountyData()"> <option>请选择</option> <option v-for="(item,index) in data" :disabled="item.is_true==1?true:false" :class=&qu

jquery操作select下拉框的多种方法(选中,取值,赋值等)

jQuery获取Select选择的Text和Value:语法解释:1. $("#select_id").change(function(){//code...});   //为Select添加事件,当选择其中一项时触发2. var checkText=$("#select_id").find("option:selected").text();  //获取Select选择的Text3. var checkValue=$("#select

select下拉框左右变换

效果图: 使用jQuery插件---multiselect2side做法: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww

jQuery操作select下拉框的text值和value值的方法

1.jquery获取当前选中select的text值 var checkText=$("#slc1").find("option:selected").text(); 2.jquery获取当前选中select的value值 var checkValue=$("#slc1").val(); 3.jquery获取当前选中select的索引值 var index=$("#slc1 ").get(0).selectedIndex; 4