博客
关于我
获取select下的第一个option的自定义属性值
阅读量:344 次
发布时间:2019-03-04

本文共 170 字,大约阅读时间需要 1 分钟。

$('.com-opt').children().eq(3).data('sid');//获取值的正确写法$('select').children(1).data('sid');//错误写法//注意这种写法是不对的,菜鸟教程里面children()是不允许有值的(但是可以有类名),我们可以通过eq()来选取值,如有不对的地方,欢迎大家指正

转载地址:http://hedh.baihongyu.com/

你可能感兴趣的文章
Netty工作笔记0055---Unpooled应用实例1
查看>>
Netty工作笔记0056---Unpooled应用实例2
查看>>
Netty工作笔记0057---Netty群聊系统服务端
查看>>
Netty工作笔记0058---Netty群聊系统客户端
查看>>
Netty工作笔记0059---Netty私聊实现思路
查看>>
Netty工作笔记0060---Netty心跳机制实例
查看>>
Netty工作笔记0060---Tcp长连接和短连接_Http长连接和短连接_UDP长连接和短连接
查看>>
Netty工作笔记0061---Netty心跳处理器编写
查看>>
Netty工作笔记0062---WebSocket长连接开发
查看>>
Netty工作笔记0063---WebSocket长连接开发2
查看>>
vue样式穿透 ::v-deep的具体使用
查看>>
Netty工作笔记0065---WebSocket长连接开发4
查看>>
Netty工作笔记0066---Netty核心模块内容梳理
查看>>
Vue基本使用---vue工作笔记0002
查看>>
Netty工作笔记0068---Protobuf机制简述
查看>>
Netty工作笔记0069---Protobuf使用案例
查看>>
Netty工作笔记0070---Protobuf使用案例Codec使用
查看>>
Netty工作笔记0071---Protobuf传输多种类型
查看>>