jQuery弹出(alert)select选择的值

时间:2013-04-21    点击:114   
复制代码 代码如下:

<script src="jquery-1.9.1.js"></script>
<script type="text/javascript">
$(function () {
$('#btn').click(function () {
alert($('#s option:selected').val());
})
})
</script>
</head>
<body>
<select id="s" multiple="multiple">
<option value="1">商</option>
<option value="2">炳</option>
<option value="3">奇</option>
</select>
<input type="button" id="btn" value="获取" /><br />
</body>
jquery获取焦点和失去焦点事件代码
jQuery获取注册信息并提示实现代码
jQuery隔行变色与普通JS写法的对比
jQuery模拟超链接点击效果代码
jquery 元素控制(追加元素/追加内容)介绍及应用
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved