当前位置:网站首页>select标签 selected 选中状态动态查询
select标签 selected 选中状态动态查询
2022-04-21 07:43:00 【长街395】
$(function() {
$('#pla').change(function(e){
fillreport();
})
});
function fillreport(){
var name = $("#pla option:selected").text();//获取pla里的内容
var val = $("#pla option:selected").val();//获取pla里的value值
alert(name +"的值:"+val);
}
//注其中pla为select的id或者name
以上代码加个<script>标签即可在html中套用
版权声明
本文为[长街395]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_56301399/article/details/124154672
边栏推荐
- Compile u-boot for stm32mp157 development board
- set集合
- 牛客白月赛4 【题解】
- Class loading and class loader overview
- 【一、xxx病虫害检测项目】3、损失函数尝试:Focal loss
- 第八章 事务
- 第四章 约束与索引
- Xiaomi router 3G R3G brushes in the records of feed and openwrt 20.02.2
- L2-3 sequence traversal of complete binary tree (25 points)
- 基于知名微服务框架go-micro开发gRPC应用程序
猜你喜欢
随机推荐
[web system course design] version 2022
Antv X6 画布平移
迅为STM32MP157开发板编译U-Boot
牛客白月赛4 【题解】
大家在深圳的一天是怎样度过的呢?
js力扣每日一题(2022/4/20)---388.文件的最长绝对路径
[introduction to C language series (8) (9)] Chapter 8 and 9, pointer and structure
不确定是 BUG 还是设定
HTTP cache policy and scheme
Redis (14) -- master-slave replication of redis
What is the difference between localhost and 127.0.0.1? (Reprinted)
MySQL编码问题
跟我学flutter:在国内如何发布自己的Plugin 或者 Package
Servlet生命周期
libevent实现客户端
Detailed explanation of burpsuite tools and examples of Library explosion
mysql rank() over,dense_rank() over,row_number() over的区别
网络安全空间导论密码学作业实现
Multi classification logistic regression judgment of three classification iris
Swift memory management








