<select class="pushtype" name="push_type" onchange="pushType(this)">
<option value="0">系統功能類</option>
<option value="1" selected="&quot;selected&quot;">營銷活動類</option>
</select>
function pushType(e) {
alert($('.pushtype option:selected').val());
alert($('.pushtype option:selected').text());
}

用jquery得到select选中的值的更多相关文章

  1. jquery获取select选中的值

    http://blog.csdn.net/renzhenhuai/article/details/19569593 误区: 一直以为jquery获取select中option被选中的文本值,是这样写的 ...

  2. jquery 取得select选中的值

    1.取得选中的值 jQuery("#select").val();是取得选中的值 2.取得的文本 jQuery("#select  option:selected&quo ...

  3. jquery 获取select选中的值

    获取选中的名称:$("#selectPinType option:selected").text(); 获取选中的值:$("#selectPinType option:s ...

  4. jQuery取得select选中的值

    $("#sxselect").change(function(){ alert($("#sxselect option:selected").val()); } ...

  5. jQuery如何获得select选中的值?input单选radio选中的值

    jQuery取得select选中的值 本来以为jQuery("#select1").val();是取得选中的值, 那么jQuery("#select1").te ...

  6. jquery操作select(选中,取值)

    最近工作中总出现select 和 option问题,整理一下,内容大部分源于网络资料 一.基础取值问题 例如<select class="selector"></ ...

  7. jquery获取select选中的文本值

    误区: 一直以为jquery获取select中option被选中的文本值,是这样写的:   $("#id").text();  //获取所有option的文本值 实际上应该这样: ...

  8. [转]jquery设置select选中,赋值等操作

    一.基础取值问题 例如<select class="selector"></select> 1.设置value为pxx的项选中 $(".selec ...

  9. Jquery获取select选中的文本与值

    jquery获取select选择的文本与值获取select :获取select 选中的 text :    $("#ddlregtype").find("option:s ...

随机推荐

  1. Importing Maven projects' has encountered a problem

    导入项目是报错,这个是maven问题--Importing Maven projects' has encountered a problem ---------------------------- ...

  2. js自己总结的小东西(打印出来方便学习)

    1.你对angular有哪些认识? 属于mvvm框架,现在非常的火,由谷歌开发出来并维护的框架,为了解决负责业务中ajax的开发痛苦,刚开始结果angular的时候,确实让我有一种耳目一些,原来代码还 ...

  3. guxh的python笔记十:包和模块

    1,包和模块 包package:本质就是一个文件夹/目录,必须带一个__init.__.py的文件 模块module:.py结尾的python文件 2,导入方法 import pandas, coll ...

  4. 安卓下设置系统字体大小影响H5页面布局

    问题描述: 调整好的h5页面,放在安卓app内嵌页面后布局正常,后来用户调整系统里面字体大小,后内嵌H5布局乱掉 问题分析: 因为用户调整了系统字体的大小,修改了根节点和body节点的font-siz ...

  5. mysql以zip安装,解决the service already exists

    mysql以zip安装, mysqld -install 报错:​The service already exists ​ 原因是之前安装了以后卸载了,服务没删掉. 解决方法:​ sc query m ...

  6. 在flask中使用websocket-实时消息推送

    - flask默认使用wsgi支持http协议,如需使用websocket需要安装gevent-websocket模块,http,websocket协议都可以支持 Django应用:channel T ...

  7. [poj P1475] Pushing Boxes

    [poj P1475] Pushing Boxes Time Limit: 2000MS   Memory Limit: 131072K   Special Judge Description Ima ...

  8. 【转】ASP.NET Core开发之HttpContext

    ASP.NET Core中的HttpContext开发,在ASP.NET开发中我们总是会经常用到HttpContext. 那么在ASP.NET Core中要如何使用HttpContext呢,下面就来具 ...

  9. vsCode---中文化

    一直使用的是webStorm这个工具,不过由于这个工具不是那么的方便:比如我平时只是想新建一个html页面来编写一些js代码,以便测试自己的想法. 但是webStorm这个工具需要新建项目然后npm运 ...

  10. python-类的约束,MD5,异常处理,日志

    # # 项目经理 # class Base: # # 对子类进行了约束. 必须重写该方法 # # 以后上班了. 拿到公司代码之后. 发现了notImplementedError 继承他 直接重写他 # ...