更多内容推荐微信公众号,欢迎关注: jquery 根据后台传过来的值动态设置下拉框.单选框选中 $(function(){ var sex=$("#sex").val(); var marriageStatus=$("#marriageStatus").val(); var education=$("#education").val(); if(!isnull(sex)){ //$("input:radio[name='sex'][v
先前条件:设置好数据库,需要三个文件CommandInfo.cs.DbHelperSQL.cs.myHelper.cs,需要修改命名空间,参照之前随笔http://www.cnblogs.com/Owen-ET/p/5999654.html 添加一个表的类User_test对应数据库的表,如下图: User_test类: using System; using System.Collections.Generic; using System.Linq; using System.Text; us
var id=$("#orderId").children('option:selected').val(); //selected选中项取值 var id=$('#orderId option:selected').val(); //原来一直都是上边的方法取值,今天刚了解到的,只要下拉框被选中后, //option的值会赋给select,name这个方法就会拿到下拉框的值 $('#sel').val();