jquery获取下拉框的值
来源:互联网 发布:hr软件inuoji 编辑:程序博客网 时间:2024/05/18 03:56
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
div { color:red; }
</style>
<script src="jquery-1.8.0.js"></script>
<script type="text/javascript">
$(function(){
$("select").change(function () {
var str = "";
$("select option:selected").each(function () {
str += $(this).text() + " ";
});
//$("div").text(str);
alert(str);
})
.change();
})
</script>
</head>
<body>
<select name="sweets" >
<option>Chocolate</option>
<option selected="selected">Candy</option>
<option>Taffy</option>
<option>Caramel</option>
<option>Fudge</option>
<option>Cookie</option>
</select>
<div></div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
div { color:red; }
</style>
<script src="jquery-1.8.0.js"></script>
<script type="text/javascript">
$(function(){
$("select").change(function () {
var str = "";
$("select option:selected").each(function () {
str += $(this).text() + " ";
});
//$("div").text(str);
alert(str);
})
.change();
})
</script>
</head>
<body>
<select name="sweets" >
<option>Chocolate</option>
<option selected="selected">Candy</option>
<option>Taffy</option>
<option>Caramel</option>
<option>Fudge</option>
<option>Cookie</option>
</select>
<div></div>
</body>
</html>
0 0
- jquery获取下拉框的值
- jQuery获取,设置下拉框的值
- jquery获取下拉框的值
- jquery获取select下拉框的值的集中案例
- 用Jquery获取select下拉框选中的的值
- jquery 选中(获取)复选框、下拉框的值
- jquery复选框全选获取下拉框的值
- jquery 获取和设置 select下拉框的值
- JQuery获取和设置select下拉框的值
- jquery 获取和设置 select下拉框的值
- jquery 获取和设置 select下拉框的值【转】
- jquery 获取和设置 select下拉框的值
- JS,Jquery获取,dropdownlist,checkbox 下拉列表框的值
- jQuery 获取和设置select下拉框的值
- Jquery获取select,dropdownlist,checkbox下拉列表框的值
- Jquery获取select,dropdownlist,checkbox下拉列表框的值
- Jquery获取select,dropdownlist,checkbox下拉列表框的值
- Jquery获取select,dropdownlist,checkbox下拉列表框的值
- finalize方法
- 通过secureCRT远程连接服务器后安装mysql
- p2p相关资源
- 学习Ajax框架之dojo:第四节——Dojo拖拽效果的实现(附源代码)
- oracle sql笔记
- jquery获取下拉框的值
- 学习Ajax框架之dojo:第五节——dojo拖拽事件小结(附源代码)
- 黑马程序员--Java基础总结---网络编程
- VBS发送邮件(163邮箱到QQ邮箱或Gmail)
- ViewPager in a ListView or a ScrollView[solution]
- 《Go语言程序设计》第3章练习
- eclipse tomcat内存加大,不然老是运行项目超内存
- 学习Ajax框架之dojo:第六节——dojo类的声明和继承(附源代码)
- PHP 中的isset empty区别