# 列表选择
> 以用户选择为例
1. 页面通过弹窗打开
2. 页面支持单选与多选
3. 页面关闭后返回选择结果
完整选择页面代码代码
```html
```
打开页面
```javascript
// 已经选择的ID列表
top.dialog.dialogData.selectedIdArray = [$('#userId').val()];
top.dialog.open({
// 打开页面,指定选择框类型
url: 'route/teacher/list-user-unselected?selectType=radio',
title: '选择用户',
width: '1000px',
height: '500px',
onClose: function() {
// 获取选择后的列表
var newSelectedArray = top.dialog.dialogData.newSelectedArray;
if(newSelectedArray && newSelectedArray.length != 0) {
// 处理选择结果
$('#userId').val(newSelectedArray[0].userId);
$('#userName').val(newSelectedArray[0].userName);
}
}
});
```