$("#ID option").each(function(){
if($(this).val() == 111){
$(this).remove();
}
});
$("<option value='111'>UPS Ground</option>").appendTo($("#ID"));
//取下拉選中的文本
$('#testSelect option:selected').text();
$("#testSelect").find('option:selected').text();
document.all.objSelect.options[document.all.objSelect.selectedIndex].text; //js操作 objSelect為select的name//取得下拉選中值
$("#testSelect").val();
//js操作
document.getElementById('objSelect').value=2;
document.all.objSelect.value;
$('#testSelect').val('111');document.all.objSelect.value = objItemValue; //js操作 objSelect為select的name或者iddocument.getElementById('sel').value=objItemValue;
$('#select_id')[0].selectedIndex = 1;
$("input[type=radio][checked]").val(); //得到单选框的选中项的值(注意中间没有空格)
$(':radio[name="radio"]:checked').val();//第二种方法
$("input[type=radio][value=2]").attr("checked",'checked'); //设置单选框value=2的为选中状态.(注意中间没有空格)
$(':radio[value="2"]').attr('checked','checked');
$("input[name='items']").get(1).checked = true;
$("input[type='checkbox'][checked]").val(); //得到复选框的选中的第一项的值
$("#chk1").attr("checked",'');//不打勾
$("#chk2").attr("checked",true);// 打勾
//全選/不選
$("#selectAll").bind('click',function(){
var sa = $(this).attr("checked");
$("input[name='sel[]']").each(function(){
this.checked=sa;
});
});
$(':input[name="keyword"]').val();//根据name值取得值
固定文本框大小: <textarea name="123" style="resize:none;"></textarea>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有