select option

获取选中项的文本值

$("#ddl_GoOutReasonType option:selected").text()

根据索引定于option项

$("#dplHb_Dw").find("option").eq(1).attr('selected','selected');

赋值定位(编辑时的常用操作)

$("#ItemType").prop("value", dtResult.ItemType);

方式二:

$("#"+selectID).find("option[value='"+dataVal+"']").attr("selected",true);   

//根据value找option的text

$("#EnablePuzzle").find("option[value='" + puzzleObj.EnablePuzzle + "']").text();

checkbox

判断是否选中

$(this).is(':checked')   或  $(this)[0].checked
if ($(chkObj).is(':checked') == true)

input type=radio 和 select option 结合

操作input type=radio 定位 select option

$(function () {
$("input[name=rblBackMoneyType]").bind("click", function () {
if($(this).val() == 0)
{
$("#dplHb_Dw").find("option").eq(1).attr('selected','selected');
}
else
{
$("#dplHb_Dw").find("option").eq(0).attr('selected', 'selected');
}
});
})

最新文章

  1. Redis 与 数据库处理数据的两种模式
  2. 多种坐标系之间的转换 Proj.NET和DotSpatial
  3. SharePoint 2013 文档库中PPT转换PDF
  4. LeetCode:Find the Difference_389
  5. jquery serialize()方法可以序列化表单值为字符串
  6. ubuntu的命令day1
  7. matlab怎么定义一个数组
  8. GPL协议的MySQL数据库
  9. PCA和白化练习之处理图像
  10. UI3_UIbarButtonItem
  11. 【Node.app】Node.js for iOS
  12. LeetCode 45
  13. nodejs 递归创建目录
  14. 安装Visual Studio 2010 - 初学者系列 - 学习者系列文章
  15. 使用supervisor管理进程
  16. Java虚拟机-类文件
  17. UIWebView的常用方法
  18. 【kindle笔记】之 《犬夜叉》-2017-12-26
  19. vMware 按装 MacOs
  20. SQLServer2012数据库降级至SQLServer2008R2的方法

热门文章

  1. 难道调用ThreadPool.QueueUserWorkItem()的时候,真是必须调用Thread.Sleep(N)吗?
  2. bzoj 2115 [Wc2011] Xor——路径和环的转化
  3. Python collections系列之单向队列
  4. Azure ASM到ARM迁移 (三) Reserved IP的迁移
  5. UEditor富文本编辑器的图片上传 http://fex.baidu.com/ueditor/#server-deploy
  6. Spring集成Quartz定时任务框架介绍
  7. Python类(七)-类的特殊成员方法
  8. python window使用paramiko简单监控数据指标数据采集
  9. windows cmd for paramiko
  10. SpringMVC工作原理图解