<!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>
<title></title>
<link href="MaxCombobox.css" rel="stylesheet" type="text/css" />
<script src="jQuery.js" type="text/javascript"></script>
<script src="MaxCombobox.js" type="text/javascript"></script>
<script>
$(function () {
var strvalue = "GA,AZ";
$("#a").LoadMaxCombobox({ ValueFields: strvalue });//加载插件,并传输值
$("#b").LoadMaxCombobox({ IsMaxSelect: false }); //加载插件,单选模式
$("#btnGetTxt").click(function () {
alert($("#a").GetTextField());
})
$("#btnGetValue").click(function () {
alert($("#a").GetValueField());
})
$("#btngettxt").click(function () {
alert($("#b").GetTextField());
})
$("#btngetval").click(function () {
alert($("#b").GetValueField());
})
})
</script>
</head>
<body>
<span class="combo" id="a"> </span>
<input id="btnGetTxt" value="获取多选模式显示值" type="button"/>
<input id="btnGetValue" value="获取多选模式隐藏值" type="button"/>
<span class="combo" id="b"> </span>
<input id="btngettxt" value="获取单选模式显示值" type="button"/>
<input id="btngetval" value="获取单选模式隐藏值" type="button"/>
</body>
</html>