1.取下拉框选中的值及文本
取值:var x=$('#demo5').val();
取文本: var x=$("#demo5 option:selected").text()
$("input[name='StCompanyCN']").val($("select[name='Company'] option:selected").text())
2.取单选按钮的值
$("input[name='isAllDept']:checked").val()
设计说明:
1. StVenF1为下拉框,它的值是在onload时赋的,在审批中时,此域值为空,如何优化
在下拉框域放另外一个文本域,StVenF1Info,用于存放StVenF1的值
2. 在onload 时,将StVenF1值赋值给StVenF1Info
var SI =[];
$("option","select[name='StVenF1']").each(function(){
SI.push($(this).text()+"|"+$(this).val());
});
document.all.StVenF1Info.value= SI.join(";");