<!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=iso-8859-1" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="design, css, rss, ajax, xml, design, usability, information architecture, flash, ria" />
<meta name="description" content="" />
<meta http-equiv="imagetoolbar" content="no" />
<title>arc90 lab | tools: jQuery MultiSelect</title>
<style type="text/css">
/* Style for this page */
@import "style.css";
</style>
<!--[if lt IE 7]>
<style type="text/css">
/* Overrides for IE */
.multiSelect div.title {
position: absolute;
z-index: 104;
width:100%; /* Fix for IE. */
}
</style>
<![endif]-->
<!--[if lt IE 6]>
<style type="text/css">
.multiSelect div.title
{
height: 20px; /* Fix for IE. */
}
</style>
<![endif]-->
<script language="javascript" type="text/javascript" src="jquery-latest.js"></script>
<script language="javascript" type="text/javascript" src="arc90_multiselect.js"></script>
<script language="javascript" type="text/javascript">
$(function() {
$('#basicmultiselect').multiSelect({select_all_min: 3});
$('#lang').multiSelect({
select_all_min: 3,
no_selection: "Please select a few items!",
selected_text: " clicked%%%%%%%%%%%"
});
$('#methods').multiSelect();
});
function doSubmit()
{
window.location="sms.action";
}
</script> </script>
</head>
<body>
<div id="container">
<h1>jQuery MultiSelect</h1>
<form action="#" method="get" name="form" id="form">
<div class="examples">
<label class="examples">First example of jQuery MultiSelect</label>
<select id="lang" name="lang" class="arc90_multiselect" multiple="multiple" title="Languages">
<option value="fr">French</option>
<option value="en" selected="true">English</option>
<option value="sp">Spanish</option>
<option value="jp" selected="true">Japanese</option>
</select>
</div>
<input type="button" onclick="doSubmit()">
</form>
</body>
</html>
那么如何在sms.action中得到其选中的值呢。。如图片所示:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="design, css, rss, ajax, xml, design, usability, information architecture, flash, ria" />
<meta name="description" content="" />
<meta http-equiv="imagetoolbar" content="no" />
<title>arc90 lab | tools: jQuery MultiSelect</title>
<style type="text/css">
/* Style for this page */
@import "style.css";
</style>
<!--[if lt IE 7]>
<style type="text/css">
/* Overrides for IE */
.multiSelect div.title {
position: absolute;
z-index: 104;
width:100%; /* Fix for IE. */
}
</style>
<![endif]-->
<!--[if lt IE 6]>
<style type="text/css">
.multiSelect div.title
{
height: 20px; /* Fix for IE. */
}
</style>
<![endif]-->
<script language="javascript" type="text/javascript" src="jquery-latest.js"></script>
<script language="javascript" type="text/javascript" src="arc90_multiselect.js"></script>
<script language="javascript" type="text/javascript">
$(function() {
$('#basicmultiselect').multiSelect({select_all_min: 3});
$('#lang').multiSelect({
select_all_min: 3,
no_selection: "Please select a few items!",
selected_text: " clicked%%%%%%%%%%%"
});
$('#methods').multiSelect();
});
function doSubmit()
{
window.location="sms.action";
}
</script> </script>
</head>
<body>
<div id="container">
<h1>jQuery MultiSelect</h1>
<form action="#" method="get" name="form" id="form">
<div class="examples">
<label class="examples">First example of jQuery MultiSelect</label>
<select id="lang" name="lang" class="arc90_multiselect" multiple="multiple" title="Languages">
<option value="fr">French</option>
<option value="en" selected="true">English</option>
<option value="sp">Spanish</option>
<option value="jp" selected="true">Japanese</option>
</select>
</div>
<input type="button" onclick="doSubmit()">
</form>
</body>
</html>
那么如何在sms.action中得到其选中的值呢。。如图片所示:
解决方案 »
- asp.net 在母版页使用jquery的问题
- 谷歌地图坐标与百度地图坐标一样吗?
- java(Servlet)+jstree 访问不到后台
- 求救!有一个文本框下边有一个bottom如果文本框没有填值就在bottom左边给一个提示,填的值是大于1小于10000,各位能不能帮一下,这个我不会写!
- 想要一个滚动图片的代码,像msn网站首页左上角那个
- 层拖拽问题请教高手
- 请教js强人,动态创建问题,有难度
- 请问谁用过选项卡控件设制多个不同的页面对不同tab页面的内容保存到数据库保存/在线!!
- netscape下,模态窗口提交表单的问题?
- 一个有趣的问题
- TD中回车问题
- 如何用getElementById调用JS代码
function doSubmit()
{
document.form.action="sms.action";}
这个插件应该会提供获得选中数据的方法,不过jquery也行。
window.location = "sms.action?lang=" + $("#lang :selected").val();
如果是多个就是数组
var lang = "";
$("#lang :selected").each(function () {
lang += $(this).val() + ",";
});
window.location = "sms.action?lang=" + lang;
在action中用request.getParmenter("lang");