日期:2014-05-17 浏览次数:20750 次
<!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>ComboBox 下拉选择框</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /><link href="../demo.css" rel="stylesheet" type="text/css" />
<script src="../../scripts/boot.js" type="text/javascript"></script>
</head>
<body>
<h1>ComboBox 下拉选择框 </h1>
<h4>单选</h4>
<input id="combo1" class="mini-combobox" style="width:150px;" textField="text" valueField="id" emptyText="请选择国家"
url="../data/countrys.txt" value="cn" required="true" allowInput="true" showNullItem="true" nullItemText="请选择..."/>
<br /><br />
<input type="button" value="setValue" onclick="setValue()"/>
<input type="button" value="getValue" onclick="getValue()"/>
<input type="button" value="disable" onclick="disable()"/>
<input type="button" value="enable" onclick="enable()"/>
<h4>多选 + 多列</h4>
<div id="combobox2" class="mini-combobox" style="width:250px;" popupWidth="400" textField="text" valueField="id"
url="../data/countrys.txt" value="cn,usa" multiSelect="true" showClose="true" oncloseclick="onCloseClick" >
<div property="columns">
<div header="ID" field="id"></div>
<div header="国家" field="text"></div>
</div>
</div>
<h4>限制输入下拉数据</h4>
<input id="combobox3" class="mini-combobox" style="width:150px;" textField="text" valueField="id"
url="../data/countrys.txt" value="cn" showNullItem="true" required="true" allowInput="true"
onvalidation="onComboValidation"
/>
<input type="button" value="getValue" onclick="getValue2()"/>
<script type="text/javascript">
&